Function at 0x40a100
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 [0x422bb8], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
mov dword [0x422bb4], 0
mov dword [0x422bb0], 0
mov dword [0x422bac], 0
mov dword [0x422ba8], 0
mov dword [0x422ba4], 0
mov dword [esp], 0x41c8e0
call ebx
mov dword [0x422bc0], eax
sub esp, 4
test eax, eax
je 0x40a7aa
mov dword [esp], str.dinput.dll
call ebx
mov dword [0x422bbc], eax
sub esp, 4
test eax, eax
je 0x40a7aa
mov eax, dword [0x422bc0]
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 [0x422bc0]
sub esp, 8
mov dword [esp + 4], str.DirectDrawEnumerateExA
mov dword [esp], eax
call ebx
mov edi, eax
mov eax, dword [0x422bbc]
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 [0x4295dc], 1
jne 0x40a5cd
xor eax, eax
test esi, esi
je 0x40a7aa
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 0x40a7aa
mov eax, dword [esp + 0x28]
mov edx, dword [eax]
mov dword [esp + 8], 0x422bb8
mov dword [esp + 4], 0x41c970
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 0x40a7aa
test esi, esi
jne 0x40a7aa
mov eax, dword [0x429184]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x422ba8
mov dword [esp + 4], 0x300
mov dword [esp], eax
call ebx
sub esp, 0x10
test eax, eax
jne 0x40a7aa
mov eax, dword [0x4295d0]
mov dword [0x422b98], 0
mov dword [0x422b94], 0
mov dword [0x422b9c], eax
mov eax, dword [0x4295d4]
mov dword [0x422ba0], eax
mov eax, dword [0x4295dc]
test al, 1
jne 0x40a7bc
mov ebx, 0x80000000
test al, 8
je 0x40a6b1
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], 0x422b94
call dword [sym.imp.USER32.dll_AdjustWindowRect]
mov eax, dword [0x422b9c]
sub eax, dword [0x422b94]
sub esp, 0xc
mov dword [0x422b9c], eax
mov edx, dword [0x422ba0]
mov dword [esp + 0x10], eax
mov eax, dword [0x422b8c]
sub edx, dword [0x422b98]
mov dword [esp + 4], 0
mov dword [esp + 0xc], eax
mov eax, dword [0x422b90]
mov dword [esp + 0x14], edx
mov dword [esp + 8], eax
mov dword [esp], ebx
mov dword [0x422ba0], edx
call fcn.00406c40
test eax, eax
jne 0x40a7aa
mov eax, dword [0x422bb8]
mov ecx, dword [0x4291b0]
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 0x40a7aa
mov eax, dword [0x422bb8]
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 0x40a7aa
mov eax, dword [esp + 0x2c]
mov ecx, dword [0x4291b0]
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 0x40a7aa
mov dword [0x422b88], 0
lea ebx, [esp + 0x64]
mov dword [esp + 8], 0x6c
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [0x41a09c]
mov eax, dword [0x422bb8]
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], 0x422bb4
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [edx + 0x18]
sub esp, 0x10
test eax, eax
jne 0x40a7aa
mov eax, dword [0x422bb4]
mov edx, dword [eax]
test byte [0x4295dc], 1
je 0x40a61a
mov dword [0x422bb0], 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 0x40a7aa
test byte [esp + 0x48], 0x40
je 0x40a7aa
mov eax, dword [esp + 0x50]
cmp eax, 8
je 0x40a8b5
cmp eax, 0x10
je 0x40a89c
cmp eax, 0x17
jbe 0x40a88c
mov ecx, dword [esp + 0x54]
mov edx, 1
cmp ecx, 0xff
je 0x40a4a6
xor edx, edx
cmp ecx, 0x1f
sete dl
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00410400
mov dword [0x4295bc], eax
test eax, eax
je 0x40a7aa
mov edx, dword [0x422bb8]
mov eax, dword [0x4200f4]
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 [0x422b80], eax
sub esp, 0x10
mov eax, 0x422be0
nop
mov edx, ebx
mov dword [eax + 4], ebx
add ebx, 1
add eax, 0x10
shl edx, 8
mov dword [eax - 0x10], 0x41c960
or edx, 0x8000000c
mov dword [eax - 4], 0
mov dword [eax - 8], edx
cmp ebx, 0x100
jne 0x40a510
mov eax, dword [0x422ba8]
mov edx, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x422ba4
mov dword [esp + 4], 0x41c950
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0x10
test eax, eax
jne 0x40a7aa
mov eax, dword [0x422ba4]
mov edx, dword [eax]
mov dword [esp + 4], 0x41c930
mov dword [esp], eax
call dword [edx + 0x2c]
sub esp, 8
test eax, eax
jne 0x40a7aa
mov eax, dword [0x422ba4]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 0x1c]
sub esp, 4
mov ebx, eax
test eax, eax
jne 0x40a7aa
mov eax, dword [0x4291b0]
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 [0x4295c0]
test edx, edx
je 0x40a1ee
test edi, edi
je 0x40a1ee
lea ebp, [esp + 0x30]
mov dword [esp + 8], 1
mov dword [esp + 4], ebp
mov dword [esp], 0x40aa60
call edi
sub esp, 0xc
test eax, eax
jne 0x40a1ee
mov eax, dword [esp + 0x40]
test eax, eax
je 0x40a1ee
mov eax, ebp
jmp 0x40a1f0
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 0x40a7aa
mov dword [esp + 8], 0x6c
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [0x41a09c]
mov eax, dword [0x4295d0]
mov dword [esp + 0x64], 0x6c
mov dword [esp + 0x68], 7
mov dword [esp + 0x70], eax
mov eax, dword [0x4295d4]
mov dword [esp + 0xcc], 0x4040
mov dword [esp + 0x6c], eax
mov eax, dword [0x422bb8]
mov edx, dword [eax]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x422bb0
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [edx + 0x18]
sub esp, 0x10
test eax, eax
jne 0x40a7aa
mov eax, dword [0x422bb4]
mov edx, dword [eax]
jmp 0x40a440
and eax, 4
cmp eax, 1
sbb ebx, ebx
and ebx, 0x10000
add ebx, 0xca0000
jmp 0x40a2c6
mov edx, dword [0x4295d0]
mov ebx, 0xf0
mov ecx, dword [0x4295d8]
xor esi, esi
mov eax, dword [0x422bb8]
mov ebp, dword [0x4295e0]
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 0x40a964
mov eax, dword [0x4295d8]
cmp eax, 0x18
je 0x40a91a
jg 0x40a86f
cmp eax, 0xf
je 0x40a882
cmp eax, 0x10
jne 0x40a76e
mov edx, 0xf
mov eax, dword [0x422bb8]
mov ecx, dword [eax]
mov dword [esp + 0x14], esi
mov dword [esp + 0xc], edx
mov esi, dword [0x4295e0]
mov edx, dword [0x4295d0]
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 0x40a964
cmp ebx, 0xef
jle 0x40a6ca
cmp ebx, 0x1df
jle 0x40a934
cmp ebx, 0x257
jle 0x40a944
cmp ebx, 0x2ff
jle 0x40a954
cmp ebx, 0x3ff
jle 0x40a924
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.00406c40
test eax, eax
jne 0x40a7aa
mov eax, dword [0x422bb8]
mov ecx, dword [0x4291b0]
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 0x40a7aa
mov edx, dword [0x4295d0]
mov ebx, dword [0x4295d4]
mov ecx, dword [0x4295d8]
cmp edx, 0x140
jne 0x40a6db
cmp ebx, 0xc8
jne 0x40a6db
xor eax, eax
cmp ecx, 8
sete al
mov esi, eax
jmp 0x40a6dd
mov edx, 0x18
cmp eax, 0x20
je 0x40a736
jmp 0x40a76e
mov edx, 0x10
jmp 0x40a736
cmp eax, 0xf
ja 0x40a978
xor edx, edx
jmp 0x40a4a6
xor eax, eax
cmp dword [esp + 0x58], 0x3e0
mov ecx, dword [esp + 0x54]
setne al
add eax, 0xf
jmp 0x40a49e
mov eax, dword [0x422bb8]
mov edx, dword [eax]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x422bac
mov dword [esp + 8], 0x4291bc
mov dword [esp + 4], 0x4c
mov dword [esp], eax
call dword [edx + 0x14]
sub esp, 0x14
test eax, eax
jne 0x40a7aa
mov eax, dword [0x422bb4]
mov ecx, dword [0x422bac]
mov edx, dword [eax]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x7c]
mov dword [0x4295c8], 0
sub esp, 8
mov eax, dword [esp + 0x50]
jmp 0x40a47b
mov edx, 0x20
jmp 0x40a736
mov edx, dword [0x4295d0]
mov ebx, 0x400
jmp 0x40a6d5
mov edx, dword [0x4295d0]
mov ebx, 0x1e0
jmp 0x40a6d5
mov edx, dword [0x4295d0]
mov ebx, 0x258
jmp 0x40a6d5
mov edx, dword [0x4295d0]
mov ebx, 0x300
jmp 0x40a6d5
mov eax, ebx
sub eax, dword [0x4295d4]
sar eax, 1
mov dword [0x422b88], eax
jmp 0x40a3c3
mov ecx, dword [esp + 0x54]
jmp 0x40a49e