Function at 0x40d230
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 [0x4283d8], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
mov dword [0x4283d4], 0
mov dword [0x4283d0], 0
mov dword [0x4283cc], 0
mov dword [0x4283c8], 0
mov dword [0x4283c4], 0
mov dword [esp], 0x41dcc0
call ebx
mov dword [0x4283e0], eax
sub esp, 4
test eax, eax
je 0x40d8da
mov dword [esp], str.dinput.dll
call ebx
mov dword [0x4283dc], eax
sub esp, 4
test eax, eax
je 0x40d8da
mov eax, dword [0x4283e0]
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 [0x4283e0]
sub esp, 8
mov dword [esp + 4], str.DirectDrawEnumerateExA
mov dword [esp], eax
call ebx
mov edi, eax
mov eax, dword [0x4283dc]
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 [0x42ea1c], 1
jne 0x40d6fd
xor eax, eax
test esi, esi
je 0x40d8da
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 0x40d8da
mov eax, dword [esp + 0x28]
mov edx, dword [eax]
mov dword [esp + 8], 0x4283d8
mov dword [esp + 4], 0x41dd50
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 0x40d8da
test esi, esi
jne 0x40d8da
mov eax, dword [0x42e5c4]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x4283c8
mov dword [esp + 4], 0x300
mov dword [esp], eax
call ebx
sub esp, 0x10
test eax, eax
jne 0x40d8da
mov eax, dword [0x42ea10]
mov dword [0x4283b8], 0
mov dword [0x4283b4], 0
mov dword [0x4283bc], eax
mov eax, dword [0x42ea14]
mov dword [0x4283c0], eax
mov eax, dword [0x42ea1c]
test al, 1
jne 0x40d8ec
mov ebx, 0x80000000
test al, 8
je 0x40d7e1
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], 0x4283b4
call dword [sym.imp.USER32.dll_AdjustWindowRect]
mov eax, dword [0x4283bc]
sub eax, dword [0x4283b4]
sub esp, 0xc
mov dword [0x4283bc], eax
mov edx, dword [0x4283c0]
mov dword [esp + 0x10], eax
mov eax, dword [0x4283ac]
sub edx, dword [0x4283b8]
mov dword [esp + 4], 0
mov dword [esp + 0xc], eax
mov eax, dword [0x4283b0]
mov dword [esp + 0x14], edx
mov dword [esp + 8], eax
mov dword [esp], ebx
mov dword [0x4283c0], edx
call fcn.00409eb0
test eax, eax
jne 0x40d8da
mov eax, dword [0x4283d8]
mov ecx, dword [0x42e5f0]
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 0x40d8da
mov eax, dword [0x4283d8]
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 0x40d8da
mov eax, dword [esp + 0x2c]
mov ecx, dword [0x42e5f0]
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 0x40d8da
mov dword [0x4283a8], 0
lea ebx, [esp + 0x64]
mov dword [esp + 8], 0x6c
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [0x41bae4]
mov eax, dword [0x4283d8]
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], 0x4283d4
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [edx + 0x18]
sub esp, 0x10
test eax, eax
jne 0x40d8da
mov eax, dword [0x4283d4]
mov edx, dword [eax]
test byte [0x42ea1c], 1
je 0x40d74a
mov dword [0x4283d0], 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 0x40d8da
test byte [esp + 0x48], 0x40
je 0x40d8da
mov eax, dword [esp + 0x50]
cmp eax, 8
je 0x40d9e5
cmp eax, 0x10
je 0x40d9cc
cmp eax, 0x17
jbe 0x40d9bc
mov ecx, dword [esp + 0x54]
mov edx, 1
cmp ecx, 0xff
je 0x40d5d6
xor edx, edx
cmp ecx, 0x1f
sete dl
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00413920
mov dword [0x42e9fc], eax
test eax, eax
je 0x40d8da
mov edx, dword [0x4283d8]
mov eax, dword [0x425914]
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 [0x4283a0], eax
sub esp, 0x10
mov eax, 0x428400
nop
mov edx, ebx
mov dword [eax + 4], ebx
add ebx, 1
add eax, 0x10
shl edx, 8
mov dword [eax - 0x10], 0x41dd40
or edx, 0x8000000c
mov dword [eax - 4], 0
mov dword [eax - 8], edx
cmp ebx, 0x100
jne 0x40d640
mov eax, dword [0x4283c8]
mov edx, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x4283c4
mov dword [esp + 4], 0x41dd30
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0x10
test eax, eax
jne 0x40d8da
mov eax, dword [0x4283c4]
mov edx, dword [eax]
mov dword [esp + 4], 0x41dd10
mov dword [esp], eax
call dword [edx + 0x2c]
sub esp, 8
test eax, eax
jne 0x40d8da
mov eax, dword [0x4283c4]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 0x1c]
sub esp, 4
mov ebx, eax
test eax, eax
jne 0x40d8da
mov eax, dword [0x42e5f0]
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 [0x42ea00]
test edx, edx
je 0x40d31e
test edi, edi
je 0x40d31e
lea ebp, [esp + 0x30]
mov dword [esp + 8], 1
mov dword [esp + 4], ebp
mov dword [esp], 0x40db90
call edi
sub esp, 0xc
test eax, eax
jne 0x40d31e
mov eax, dword [esp + 0x40]
test eax, eax
je 0x40d31e
mov eax, ebp
jmp 0x40d320
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 0x40d8da
mov dword [esp + 8], 0x6c
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [0x41bae4]
mov eax, dword [0x42ea10]
mov dword [esp + 0x64], 0x6c
mov dword [esp + 0x68], 7
mov dword [esp + 0x70], eax
mov eax, dword [0x42ea14]
mov dword [esp + 0xcc], 0x4040
mov dword [esp + 0x6c], eax
mov eax, dword [0x4283d8]
mov edx, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x4283d0
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [edx + 0x18]
sub esp, 0x10
test eax, eax
jne 0x40d8da
mov eax, dword [0x4283d4]
mov edx, dword [eax]
jmp 0x40d570
and eax, 4
cmp eax, 1
sbb ebx, ebx
and ebx, 0x10000
add ebx, 0xca0000
jmp 0x40d3f6
mov edx, dword [0x42ea10]
mov ebx, 0xf0
mov ecx, dword [0x42ea18]
xor esi, esi
mov eax, dword [0x4283d8]
mov ebp, dword [0x42ea20]
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 0x40da94
mov eax, dword [0x42ea18]
cmp eax, 0x18
je 0x40da4a
jg 0x40d99f
cmp eax, 0xf
je 0x40d9b2
cmp eax, 0x10
jne 0x40d89e
mov edx, 0xf
mov eax, dword [0x4283d8]
mov ecx, dword [eax]
mov dword [esp + 0x14], esi
mov dword [esp + 0xc], edx
mov esi, dword [0x42ea20]
mov edx, dword [0x42ea10]
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 0x40da94
cmp ebx, 0xef
jle 0x40d7fa
cmp ebx, 0x1df
jle 0x40da64
cmp ebx, 0x257
jle 0x40da74
cmp ebx, 0x2ff
jle 0x40da84
cmp ebx, 0x3ff
jle 0x40da54
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.00409eb0
test eax, eax
jne 0x40d8da
mov eax, dword [0x4283d8]
mov ecx, dword [0x42e5f0]
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 0x40d8da
mov edx, dword [0x42ea10]
mov ebx, dword [0x42ea14]
mov ecx, dword [0x42ea18]
cmp edx, 0x140
jne 0x40d80b
cmp ebx, 0xc8
jne 0x40d80b
xor eax, eax
cmp ecx, 8
sete al
mov esi, eax
jmp 0x40d80d
mov edx, 0x18
cmp eax, 0x20
je 0x40d866
jmp 0x40d89e
mov edx, 0x10
jmp 0x40d866
cmp eax, 0xf
ja 0x40daa8
xor edx, edx
jmp 0x40d5d6
xor eax, eax
cmp dword [esp + 0x58], 0x3e0
mov ecx, dword [esp + 0x54]
setne al
add eax, 0xf
jmp 0x40d5ce
mov eax, dword [0x4283d8]
mov edx, dword [eax]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x4283cc
mov dword [esp + 8], 0x42e5fc
mov dword [esp + 4], 0x4c
mov dword [esp], eax
call dword [edx + 0x14]
sub esp, 0x14
test eax, eax
jne 0x40d8da
mov eax, dword [0x4283d4]
mov ecx, dword [0x4283cc]
mov edx, dword [eax]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x7c]
mov dword [0x42ea08], 0
sub esp, 8
mov eax, dword [esp + 0x50]
jmp 0x40d5ab
mov edx, 0x20
jmp 0x40d866
mov edx, dword [0x42ea10]
mov ebx, 0x400
jmp 0x40d805
mov edx, dword [0x42ea10]
mov ebx, 0x1e0
jmp 0x40d805
mov edx, dword [0x42ea10]
mov ebx, 0x258
jmp 0x40d805
mov edx, dword [0x42ea10]
mov ebx, 0x300
jmp 0x40d805
mov eax, ebx
sub eax, dword [0x42ea14]
sar eax, 1
mov dword [0x4283a8], eax
jmp 0x40d4f3
mov ecx, dword [esp + 0x54]
jmp 0x40d5ce