Function at 0x40d240
Capabilities:
Check http status code

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xdc
mov dword [0x425db8], 0
mov dword [0x425db4], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
mov dword [0x425db0], 0
mov dword [0x425dac], 0
mov dword [0x425da8], 0
mov dword [0x425da4], 0
mov dword [esp], str.ddraw.dll
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
call ebx
sub esp, 4
test eax, eax
mov dword [0x425dc0], eax
je 0x40d6f0
mov dword [esp], str.dinput.dll
call ebx
sub esp, 4
test eax, eax
mov dword [0x425dbc], eax
je 0x40d6f0
mov eax, dword [0x425dc0]
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 [0x425dc0]
sub esp, 8
mov dword [esp + 4], str.DirectDrawEnumerateExA
mov dword [esp], eax
call ebx
mov edi, eax
mov eax, dword [0x425dbc]
sub esp, 8
mov dword [esp + 4], str.DirectInputCreateA
mov dword [esp], eax
call ebx
sub esp, 8
test byte [0x43069c], 1
mov ebx, eax
mov dword [esp + 0x40], 0
jne 0x40d700
xor eax, eax
test esi, esi
je 0x40d6f0
lea edx, [esp + 0x28]
mov dword [esp + 8], 0
mov dword [esp], eax
mov dword [esp + 4], edx
call esi
sub esp, 0xc
test eax, eax
jne 0x40d6f0
mov eax, dword [esp + 0x28]
mov edx, dword [eax]
mov dword [esp + 8], 0x425db8
mov dword [esp + 4], 0x41dda8
mov dword [esp], eax
call dword [edx]
sub esp, 0xc
mov esi, eax
mov edx, dword [esp + 0x28]
mov eax, dword [edx]
mov dword [esp], edx
call dword [eax + 8]
sub esp, 4
test esi, esi
jne 0x40d6f0
test ebx, ebx
je 0x40d6f0
mov eax, dword [0x430244]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x425da8
mov dword [esp + 4], 0x300
mov dword [esp], eax
call ebx
sub esp, 0x10
test eax, eax
jne 0x40d6f0
mov eax, dword [0x430690]
mov dword [0x425d98], 0
mov dword [0x425d94], 0
mov dword [0x425d9c], eax
mov eax, dword [0x430694]
mov dword [0x425da0], eax
mov eax, dword [0x43069c]
test al, 1
jne 0x40d761
test al, 8
mov ebx, 0x90000000
je 0x40d748
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], 0x425d94
call dword [sym.imp.USER32.dll_AdjustWindowRect]
mov eax, dword [0x425d9c]
sub eax, dword [0x425d94]
sub esp, 0xc
mov edx, dword [0x425da0]
sub edx, dword [0x425d98]
mov dword [esp + 4], 0
mov dword [esp], ebx
mov dword [0x425d9c], eax
mov dword [esp + 0x10], eax
mov eax, dword [0x425d8c]
mov dword [esp + 0x14], edx
mov dword [0x425da0], edx
mov dword [esp + 0xc], eax
mov eax, dword [0x425d90]
mov dword [esp + 8], eax
call fcn.00408630
test eax, eax
jne 0x40d6f0
mov eax, dword [0x425db8]
mov ecx, dword [0x430270]
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 0x40d6f0
mov eax, dword [0x425db8]
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 0x40d6f0
mov eax, dword [esp + 0x2c]
mov ecx, dword [0x430270]
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 0x40d6f0
mov dword [0x425d88], 0
lea ebx, [esp + 0x64]
mov dword [esp + 8], 0x6c
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [0x41b304]
mov eax, dword [0x425db8]
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], 0x425db4
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [edx + 0x18]
sub esp, 0x10
test eax, eax
jne 0x40d6f0
test byte [0x43069c], 1
mov eax, dword [0x425db4]
je 0x40d934
mov dword [0x425db0], eax
mov edx, dword [eax]
lea ecx, [esp + 0x44]
mov dword [esp + 0x44], 0x20
mov dword [esp], eax
mov dword [esp + 4], ecx
call dword [edx + 0x54]
sub esp, 8
test eax, eax
jne 0x40d6f0
test byte [esp + 0x48], 0x40
je 0x40d6f0
mov eax, dword [esp + 0x50]
cmp eax, 8
je 0x40da0f
cmp eax, 0x10
je 0x40d9de
cmp eax, 0x17
jbe 0x40d9ff
mov ecx, dword [esp + 0x54]
mov edx, 1
cmp ecx, 0xff
je 0x40d5e4
xor edx, edx
cmp ecx, 0x1f
sete dl
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00410810
test eax, eax
mov dword [0x43067c], eax
je 0x40d6f0
mov edx, dword [0x425db8]
mov eax, dword [0x423194]
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]
xor edx, edx
mov dword [0x425d80], eax
sub esp, 0x10
mov eax, 0x425e00
nop
mov ecx, edx
mov dword [eax + 4], edx
add edx, 1
shl ecx, 8
mov dword [eax], 0x41dd98
mov dword [eax + 0xc], 0
or ecx, 0x8000000c
add eax, 0x10
mov dword [eax - 8], ecx
cmp edx, 0x100
jne 0x40d650
mov eax, dword [0x425da8]
mov edx, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x425da4
mov dword [esp + 4], 0x41dd88
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0x10
test eax, eax
jne 0x40d6f0
mov eax, dword [0x425da4]
mov edx, dword [eax]
mov dword [esp + 4], 0x41dd68
mov dword [esp], eax
call dword [edx + 0x2c]
sub esp, 8
test eax, eax
jne 0x40d6f0
mov eax, dword [0x425da4]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 0x1c]
sub esp, 4
test eax, eax
setne al
add esp, 0xdc
movzx eax, al
pop ebx
neg eax
pop esi
pop edi
pop ebp
ret
add esp, 0xdc
mov eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret
test edi, edi
je 0x40d32e
mov ecx, dword [0x430680]
test ecx, ecx
je 0x40d32e
lea ebp, [esp + 0x30]
mov dword [esp + 8], 1
mov dword [esp], 0x40db80
mov dword [esp + 4], ebp
call edi
sub esp, 0xc
test eax, eax
jne 0x40d32e
mov edx, dword [esp + 0x40]
test edx, edx
cmovne eax, ebp
jmp 0x40d330
and eax, 4
cmp eax, 1
sbb ebx, ebx
and ebx, 0x10000
add ebx, 0x10ca0000
jmp 0x40d406
mov ebx, dword [sym.imp.USER32.dll_GetSystemMetrics]
mov dword [esp], 1
call ebx
sub esp, 4
mov esi, eax
mov dword [esp], 0
call ebx
sub esp, 4
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0x90000000
call fcn.00408630
test eax, eax
jne 0x40d6f0
mov eax, dword [0x425db8]
mov ecx, dword [0x430270]
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 0x40d6f0
mov ebx, dword [0x430694]
cmp ebx, 0xc8
mov edx, dword [0x430690]
mov edi, dword [0x430698]
jne 0x40d805
cmp edx, 0x140
je 0x40d8d0
xor esi, esi
mov eax, dword [0x425db8]
mov ebp, dword [0x4306a0]
mov ecx, dword [eax]
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], ebp
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [ecx + 0x54]
sub esp, 0x18
test eax, eax
je 0x40d9cb
mov eax, dword [0x430698]
cmp eax, 0x10
je 0x40d920
jle 0x40d8f0
cmp eax, 0x18
je 0x40d910
cmp eax, 0x20
mov edx, 0x18
jne 0x40d898
mov eax, dword [0x425db8]
mov ecx, dword [eax]
mov dword [esp + 0x14], esi
mov dword [esp + 0xc], edx
mov esi, dword [0x4306a0]
mov edx, dword [0x430690]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 0x10], esi
mov dword [esp + 4], edx
call dword [ecx + 0x54]
sub esp, 0x18
test eax, eax
je 0x40d9cb
cmp ebx, 0xef
jle 0x40d8e3
cmp ebx, 0x1df
jle 0x40d900
cmp ebx, 0x257
jle 0x40d92a
cmp ebx, 0x2ff
jg 0x40da74
mov ebx, 0x300
jmp 0x40d7e5
cmp edi, 8
mov esi, 1
jne 0x40d805
jmp 0x40d807
mov ebx, 0xf0
jmp 0x40d7e5
cmp eax, 0xf
mov edx, 0x10
je 0x40d860
jmp 0x40d898
mov ebx, 0x1e0
jmp 0x40d7e5
mov edx, 0x20
jmp 0x40d860
mov edx, 0xf
jmp 0x40d860
mov ebx, 0x258
jmp 0x40d7e5
mov edx, dword [eax]
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 0x40d6f0
mov dword [esp + 8], 0x6c
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [0x41b304]
mov eax, dword [0x430690]
mov dword [esp + 0x64], 0x6c
mov dword [esp + 0x68], 7
mov dword [esp + 0xcc], 0x4040
mov dword [esp + 0x70], eax
mov eax, dword [0x430694]
mov dword [esp + 0x6c], eax
mov eax, dword [0x425db8]
mov edx, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x425db0
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [edx + 0x18]
sub esp, 0x10
test eax, eax
jne 0x40d6f0
mov eax, dword [0x425db4]
jmp 0x40d57e
sub ebx, dword [0x430694]
sar ebx, 1
mov dword [0x425d88], ebx
jmp 0x40d503
cmp dword [esp + 0x58], 0x3e0
mov ecx, dword [esp + 0x54]
mov edx, 0xf
cmove eax, edx
xor edx, edx
cmp ecx, 0x1f
sete dl
jmp 0x40d5e4
cmp eax, 0xf
ja 0x40da8a
xor edx, edx
jmp 0x40d5e4
mov eax, dword [0x425db8]
mov edx, dword [eax]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x425dac
mov dword [esp + 8], 0x43027c
mov dword [esp + 4], 0x4c
mov dword [esp], eax
call dword [edx + 0x14]
sub esp, 0x14
test eax, eax
jne 0x40d6f0
mov eax, dword [0x425db4]
mov ecx, dword [0x425dac]
mov edx, dword [eax]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x7c]
sub esp, 8
mov dword [0x430688], 0
mov eax, dword [esp + 0x50]
jmp 0x40d5b9
cmp ebx, 0x3ff
jg 0x40d6f0
mov ebx, 0x400
jmp 0x40d7e5
mov ecx, dword [esp + 0x54]
jmp 0x40d5dc