Function at 0x40bc10
Capabilities:
Check http status code

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xdc
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [0x42b7f8], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
mov dword [0x42b7f4], 0
mov dword [0x42b7f0], 0
mov dword [0x42b7ec], 0
mov dword [0x42b7e8], 0
mov dword [0x42b7e4], 0
mov dword [esp], 0x423ec0
call ebx
mov dword [0x42b800], eax
sub esp, 4
test eax, eax
je 0x40c2ba
mov dword [esp], str.dinput.dll
call ebx
mov dword [0x42b7fc], eax
sub esp, 4
test eax, eax
je 0x40c2ba
mov eax, dword [0x42b800]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esp + 4], str.DirectDrawCreate
mov dword [esp], eax
call ebx
mov esi, eax
mov eax, dword [0x42b800]
sub esp, 8
mov dword [esp + 4], str.DirectDrawEnumerateExA
mov dword [esp], eax
call ebx
mov edi, eax
mov eax, dword [0x42b7fc]
sub esp, 8
mov dword [esp + 4], str.DirectInputCreateA
mov dword [esp], eax
call ebx
sub esp, 8
mov ebx, eax
mov dword [esp + 0x40], 0
test byte [0x4356fc], 1
jne 0x40c0dd
xor eax, eax
test esi, esi
je 0x40c2ba
lea edx, [esp + 0x28]
mov dword [esp + 8], 0
mov dword [esp + 4], edx
mov dword [esp], eax
call esi
sub esp, 0xc
test eax, eax
jne 0x40c2ba
mov eax, dword [esp + 0x28]
mov edx, dword [eax]
mov dword [esp + 8], 0x42b7f8
mov dword [esp + 4], 0x423f50
mov dword [esp], eax
call dword [edx]
sub esp, 0xc
mov esi, eax
mov eax, dword [esp + 0x28]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
test ebx, ebx
je 0x40c2ba
test esi, esi
jne 0x40c2ba
mov eax, dword [0x4352a4]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x42b7e8
mov dword [esp + 4], 0x300
mov dword [esp], eax
call ebx
sub esp, 0x10
test eax, eax
jne 0x40c2ba
mov eax, dword [0x4356f0]
mov dword [0x42b7d8], 0
mov dword [0x42b7d4], 0
mov dword [0x42b7dc], eax
mov eax, dword [0x4356f4]
mov dword [0x42b7e0], eax
mov eax, dword [0x4356fc]
test al, 1
jne 0x40c2cc
mov ebx, 0x80000000
test al, 8
je 0x40c1c1
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], 0x42b7d4
call dword [sym.imp.USER32.dll_AdjustWindowRect]
mov eax, dword [0x42b7dc]
sub eax, dword [0x42b7d4]
sub esp, 0xc
mov dword [0x42b7dc], eax
mov edx, dword [0x42b7e0]
mov dword [esp + 0x10], eax
mov eax, dword [0x42b7cc]
sub edx, dword [0x42b7d8]
mov dword [esp + 4], 0
mov dword [esp + 0xc], eax
mov eax, dword [0x42b7d0]
mov dword [esp + 0x14], edx
mov dword [esp + 8], eax
mov dword [esp], ebx
mov dword [0x42b7e0], edx
call fcn.00408750
test eax, eax
jne 0x40c2ba
mov eax, dword [0x42b7f8]
mov ecx, dword [0x4352d0]
mov edx, dword [eax]
mov dword [esp + 8], 8
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x50]
sub esp, 0xc
test eax, eax
jne 0x40c2ba
mov eax, dword [0x42b7f8]
lea ecx, [esp + 0x2c]
mov edx, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], ecx
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x10]
sub esp, 0x10
test eax, eax
jne 0x40c2ba
mov eax, dword [esp + 0x2c]
mov ecx, dword [0x4352d0]
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x20]
sub esp, 0xc
test eax, eax
jne 0x40c2ba
mov dword [0x42b7c8], 0
lea ebx, [esp + 0x64]
mov dword [esp + 8], 0x6c
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [0x4211c4]
mov eax, dword [0x42b7f8]
mov dword [esp + 0x64], 0x6c
mov dword [esp + 0x68], 1
mov dword [esp + 0xcc], 0x200
mov edx, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x42b7f4
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [edx + 0x18]
sub esp, 0x10
test eax, eax
jne 0x40c2ba
mov eax, dword [0x42b7f4]
mov edx, dword [eax]
test byte [0x4356fc], 1
je 0x40c12a
mov dword [0x42b7f0], eax
lea ecx, [esp + 0x44]
mov dword [esp + 0x44], 0x20
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x54]
sub esp, 8
mov ebx, eax
test eax, eax
jne 0x40c2ba
test byte [esp + 0x48], 0x40
je 0x40c2ba
mov eax, dword [esp + 0x50]
cmp eax, 8
je 0x40c3c5
cmp eax, 0x10
je 0x40c3ac
cmp eax, 0x17
jbe 0x40c39c
mov ecx, dword [esp + 0x54]
mov edx, 1
cmp ecx, 0xff
je 0x40bfb6
xor edx, edx
cmp ecx, 0x1f
sete dl
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.004113e0
mov dword [0x4356dc], eax
test eax, eax
je 0x40c2ba
mov edx, dword [0x42b7f8]
mov eax, dword [0x428d34]
mov ecx, dword [edx]
add eax, 0x68
mov dword [esp], edx
mov dword [esp + 4], eax
call dword [ecx + 0x3c]
sub esp, 8
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [0x42b7c0], eax
sub esp, 0x10
mov eax, 0x42b820
nop
mov edx, ebx
mov dword [eax + 4], ebx
add ebx, 1
add eax, 0x10
shl edx, 8
mov dword [eax - 0x10], 0x423f40
or edx, 0x8000000c
mov dword [eax - 4], 0
mov dword [eax - 8], edx
cmp ebx, 0x100
jne 0x40c020
mov eax, dword [0x42b7e8]
mov edx, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x42b7e4
mov dword [esp + 4], 0x423f30
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0x10
test eax, eax
jne 0x40c2ba
mov eax, dword [0x42b7e4]
mov edx, dword [eax]
mov dword [esp + 4], 0x423f10
mov dword [esp], eax
call dword [edx + 0x2c]
sub esp, 8
test eax, eax
jne 0x40c2ba
mov eax, dword [0x42b7e4]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 0x1c]
sub esp, 4
mov ebx, eax
test eax, eax
jne 0x40c2ba
mov eax, dword [0x4352d0]
mov dword [esp + 4], 1
mov dword [esp], eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, ebx
sub esp, 8
add esp, 0xdc
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [0x4356e0]
test edx, edx
je 0x40bcfe
test edi, edi
je 0x40bcfe
lea ebp, [esp + 0x30]
mov dword [esp + 8], 1
mov dword [esp + 4], ebp
mov dword [esp], 0x40c570
call edi
sub esp, 0xc
test eax, eax
jne 0x40bcfe
mov eax, dword [esp + 0x40]
test eax, eax
je 0x40bcfe
mov eax, ebp
jmp 0x40bd00
mov ecx, dword [esp + 0x2c]
mov dword [esp], eax
mov dword [esp + 4], ecx
call dword [edx + 0x70]
sub esp, 8
test eax, eax
jne 0x40c2ba
mov dword [esp + 8], 0x6c
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [0x4211c4]
mov eax, dword [0x4356f0]
mov dword [esp + 0x64], 0x6c
mov dword [esp + 0x68], 7
mov dword [esp + 0x70], eax
mov eax, dword [0x4356f4]
mov dword [esp + 0xcc], 0x4040
mov dword [esp + 0x6c], eax
mov eax, dword [0x42b7f8]
mov edx, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x42b7f0
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [edx + 0x18]
sub esp, 0x10
test eax, eax
jne 0x40c2ba
mov eax, dword [0x42b7f4]
mov edx, dword [eax]
jmp 0x40bf50
and eax, 4
cmp eax, 1
sbb ebx, ebx
and ebx, 0x10000
add ebx, 0xca0000
jmp 0x40bdd6
mov edx, dword [0x4356f0]
mov ebx, 0xf0
mov ecx, dword [0x4356f8]
xor esi, esi
mov eax, dword [0x42b7f8]
mov ebp, dword [0x435700]
mov edi, dword [eax]
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], ebp
mov dword [esp + 0xc], ecx
mov dword [esp + 8], ebx
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [edi + 0x54]
sub esp, 0x18
test eax, eax
je 0x40c474
mov eax, dword [0x4356f8]
cmp eax, 0x18
je 0x40c42a
jg 0x40c37f
cmp eax, 0xf
je 0x40c392
cmp eax, 0x10
jne 0x40c27e
mov edx, 0xf
mov eax, dword [0x42b7f8]
mov ecx, dword [eax]
mov dword [esp + 0x14], esi
mov dword [esp + 0xc], edx
mov esi, dword [0x435700]
mov edx, dword [0x4356f0]
mov dword [esp + 8], ebx
mov dword [esp + 0x10], esi
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [ecx + 0x54]
sub esp, 0x18
test eax, eax
je 0x40c474
cmp ebx, 0xef
jle 0x40c1da
cmp ebx, 0x1df
jle 0x40c444
cmp ebx, 0x257
jle 0x40c454
cmp ebx, 0x2ff
jle 0x40c464
cmp ebx, 0x3ff
jle 0x40c434
add esp, 0xdc
mov ebx, 0xffffffff
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
mov dword [esp], 1
call esi
sub esp, 4
mov ebx, eax
mov dword [esp], 0
call esi
sub esp, 4
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0x80000000
call fcn.00408750
test eax, eax
jne 0x40c2ba
mov eax, dword [0x42b7f8]
mov ecx, dword [0x4352d0]
mov edx, dword [eax]
mov dword [esp + 8], 0x13
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x50]
sub esp, 0xc
test eax, eax
jne 0x40c2ba
mov edx, dword [0x4356f0]
mov ebx, dword [0x4356f4]
mov ecx, dword [0x4356f8]
cmp edx, 0x140
jne 0x40c1eb
cmp ebx, 0xc8
jne 0x40c1eb
xor eax, eax
cmp ecx, 8
sete al
mov esi, eax
jmp 0x40c1ed
mov edx, 0x18
cmp eax, 0x20
je 0x40c246
jmp 0x40c27e
mov edx, 0x10
jmp 0x40c246
cmp eax, 0xf
ja 0x40c488
xor edx, edx
jmp 0x40bfb6
xor eax, eax
cmp dword [esp + 0x58], 0x3e0
mov ecx, dword [esp + 0x54]
setne al
add eax, 0xf
jmp 0x40bfae
mov eax, dword [0x42b7f8]
mov edx, dword [eax]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x42b7ec
mov dword [esp + 8], 0x4352dc
mov dword [esp + 4], 0x4c
mov dword [esp], eax
call dword [edx + 0x14]
sub esp, 0x14
test eax, eax
jne 0x40c2ba
mov eax, dword [0x42b7f4]
mov ecx, dword [0x42b7ec]
mov edx, dword [eax]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x7c]
mov dword [0x4356e8], 0
sub esp, 8
mov eax, dword [esp + 0x50]
jmp 0x40bf8b
mov edx, 0x20
jmp 0x40c246
mov edx, dword [0x4356f0]
mov ebx, 0x400
jmp 0x40c1e5
mov edx, dword [0x4356f0]
mov ebx, 0x1e0
jmp 0x40c1e5
mov edx, dword [0x4356f0]
mov ebx, 0x258
jmp 0x40c1e5
mov edx, dword [0x4356f0]
mov ebx, 0x300
jmp 0x40c1e5
mov eax, ebx
sub eax, dword [0x4356f4]
sar eax, 1
mov dword [0x42b7c8], eax
jmp 0x40bed3
mov ecx, dword [esp + 0x54]
jmp 0x40bfae