Function at 0x403c50
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x2c
push ebx
mov ebx, ecx
push ebp
push esi
mov ecx, dword [ebx + 0x108]
push edi
mov byte [esp + 0x12], 1
mov eax, dword [ecx]
call dword [eax + 0x18]
mov ecx, dword [ebx + 0xf8]
xor ebp, ebp
push ebp
push 0x8000080
push 3
push ebp
push 1
push 0x80000000
push ecx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x38], ebp
mov byte [esp + 0x2f], 0
mov dword [esp + 0x40], 0xffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x20], edi
je 0x403e9b
push ebp
push ebp
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x403e9b
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [esp + 0x14]
push ebp
push edx
lea eax, [esp + 0x40]
push 4
push eax
push edi
call esi
test eax, eax
je 0x403e9b
cmp dword [esp + 0x14], 4
jb 0x403e9b
push 8
call fcn.0040a590
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x403e9b
lea ecx, [esp + 0x14]
push 0
push ecx
push 8
push ebp
push edi
call esi
test eax, eax
je 0x403e9b
mov eax, dword [esp + 0x14]
mov ecx, 8
cmp eax, ecx
jb 0x403e9b
mov edi, ebp
mov esi, str.ADGW_SDK
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x403e9b
push ebp
call fcn.0040a130
mov edx, dword [esp + 0x24]
add esp, 4
xor ebp, ebp
lea eax, [esp + 0x14]
push ebp
push eax
lea ecx, [esp + 0x20]
push 2
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403e9b
cmp dword [esp + 0x14], 2
jb 0x403e9b
mov esi, dword [esp + 0x30]
cmp word [esp + 0x18], si
jne 0x403e9b
and esi, 0xffff
push esi
mov dword [esp + 0x38], esi
call fcn.0040a590
mov edi, eax
add esp, 4
test edi, edi
mov dword [esp + 0x1c], edi
je 0x403e9b
mov eax, dword [esp + 0x18]
and eax, 0xffff
push eax
call fcn.0040a590
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x403e9b
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x14]
push 0
and edx, 0xffff
push ecx
push edx
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403e9b
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
and ecx, 0xffff
cmp eax, ecx
jb 0x403e9b
mov ecx, dword [ebx + 0x108]
mov eax, dword [esp + 0x20]
push edi
push esi
mov edx, dword [ecx]
push 0xe
push eax
call dword [edx + 8]
mov ecx, dword [esp + 0x18]
mov esi, ebp
and ecx, 0xffff
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x403e9b
push ebp
call fcn.0040a130
mov eax, dword [esp + 0x20]
add esp, 4
xor ebp, ebp
push eax
call fcn.0040a130
mov esi, dword [esp + 0x24]
add esp, 4
lea ecx, [esp + 0x28]
lea edx, [esp + 0x2c]
push ecx
push edx
push esi
mov ecx, ebx
mov dword [esp + 0x28], ebp
call fcn.004040a0
test al, al
je 0x403e9b
cmp word [esp + 0x2c], 2
je 0x403e5e
mov byte [esp + 0x13], 1
cmp word [esp + 0x28], bp
je 0x403e6a
mov byte [esp + 0x13], 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [esp + 0x13]
mov dword [esp + 0x20], 0xffffffff
test al, al
je 0x403eec
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
push eax
push ecx
push edx
mov ecx, ebx
call fcn.00404200
test al, al
jne 0x403ea0
mov byte [esp + 0x12], 0
test ebp, ebp
je 0x403ead
push ebp
call fcn.0040a130
add esp, 4
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x403ebe
push eax
call fcn.0040a130
add esp, 4
mov eax, dword [esp + 0x20]
cmp eax, 0xffffffff
je 0x403ece
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x24]
cmp eax, 0xffffffff
je 0x403ede
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [esp + 0x12]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret 4
mov eax, dword [ebx + 0xfc]
push ebp
push 0x8000080
push 3
push ebp
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x24], esi
je 0x403e9b
push ebp
push ebp
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x403e9b
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0x14]
push ebp
push ecx
lea edx, [esp + 0x40]
push 4
push edx
push esi
call edi
test eax, eax
je 0x403e9b
cmp dword [esp + 0x14], 4
jb 0x403e9b
push 8
call fcn.0040a590
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x403e9b
lea eax, [esp + 0x14]
push 0
push eax
push 8
push ebp
push esi
call edi
test eax, eax
je 0x403e9b
mov eax, dword [esp + 0x14]
mov ecx, 8
cmp eax, ecx
jb 0x403e9b
mov edi, ebp
mov esi, str.ADGW_IDX
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x403e9b
push ebp
call fcn.0040a130
mov esi, dword [esp + 0x28]
add esp, 4
xor ebp, ebp
lea eax, [esp + 0x14]
push ebp
push eax
lea ecx, [esp + 0x20]
push 2
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403e9b
cmp dword [esp + 0x14], 2
jb 0x403e9b
mov dx, word [esp + 0x30]
cmp word [esp + 0x18], dx
jne 0x403e9b
mov eax, dword [esp + 0x34]
push eax
call fcn.0040a590
mov edi, eax
add esp, 4
test edi, edi
mov dword [esp + 0x1c], edi
je 0x403e9b
mov ecx, dword [esp + 0x18]
and ecx, 0xffff
push ecx
call fcn.0040a590
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x403e9b
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x14]
push 0
and eax, 0xffff
push edx
push eax
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403e9b
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
and ecx, 0xffff
cmp eax, ecx
jb 0x403e9b
mov ebx, dword [ebx + 0x108]
mov eax, dword [esp + 0x34]
push edi
push eax
mov edx, dword [ebx]
push 0xe
push esi
mov ecx, ebx
call dword [edx + 8]
mov ecx, dword [esp + 0x18]
mov esi, ebp
and ecx, 0xffff
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x403e9b
push ebp
call fcn.0040a130
mov eax, dword [esp + 0x20]
add esp, 4
xor ebp, ebp
push eax
call fcn.0040a130
add esp, 4
mov dword [esp + 0x1c], ebp
jmp 0x403ea0