Function at 0x500510
Capabilities:
Parse pe header
Read file on windows

Disassembly:
sub esp, 0x274
mov eax, dword [0x6aae14]
xor eax, esp
mov dword [esp + 0x270], eax
mov eax, dword [esp + 0x280]
push ebx
mov ebx, dword [esp + 0x280]
push edi
mov edi, dword [esp + 0x280]
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], 0
test ebx, ebx
je 0x500552
mov byte [ebx], 0
test eax, eax
je 0x50055c
mov dword [eax], 0
test edi, edi
je 0x500b4a
cmp byte [edi], 0
je 0x500b4a
push 0x5c
push edi
call fcn.005e0a00
add esp, 8
test eax, eax
je 0x500583
inc eax
mov dword [esp + 0x24], eax
jmp 0x500587
mov dword [esp + 0x24], edi
push ebp
push esi
push 0
push 0x80
push 3
push 0
push 3
push connect
push edi
call fcn.004e0400
mov ebp, eax
add esp, 0x1c
mov dword [esp + 0x10], ebp
cmp ebp, 0xffffffff
jne 0x50061d
push 0x103
lea eax, [esp + 0x181]
push 0
push eax
mov byte [esp + 0x188], 0
call fcn.005dfd60
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0xc
call esi
mov edi, eax
call esi
push eax
lea ecx, [esp + 0x180]
push 0x104
push ecx
call fcn.004d8b50
add esp, 0xc
test ebx, ebx
je 0x50060f
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x17c]
push edx
push eax
push str.Unable_to_open_file__s__Reason:__s
push ebx
call fcn.005dfb23
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x500aa5
push 0x3f
lea ecx, [esp + 0x49]
push 0
push ecx
mov byte [esp + 0x50], 0
call fcn.005dfd60
push 0xf7
lea edx, [esp + 0x95]
push 0
push edx
mov byte [esp + 0x9c], 0
call fcn.005dfd60
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
add esp, 0x18
push 0
lea eax, [esp + 0x1c]
push eax
push 0x40
lea ecx, [esp + 0x50]
push ecx
push ebp
call esi
test eax, eax
jne 0x50068f
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [esp + 0x10]
push edx
mov esi, eax
call fcn.004dca10
test ebx, ebx
je 0x500b3c
push edi
push str.Error_Reading_file__s_
jmp 0x500b33
cmp dword [esp + 0x18], 0x40
je 0x5006bb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
lea eax, [esp + 0x10]
push eax
call fcn.004dca10
test ebx, ebx
je 0x500b3c
push edi
push str.Unable_to_read_DosHeader_from__s_
jmp 0x500b33
movsx ecx, byte [esp + 0x44]
push ecx
call fcn.005e3ae6
add esp, 4
cmp eax, 0x4d
jne 0x500b17
movsx edx, byte [esp + 0x45]
push edx
call fcn.005e3ae6
add esp, 4
cmp eax, 0x5a
jne 0x500b17
mov eax, dword [esp + 0x80]
push 0
push 0
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x500726
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x10]
push ecx
mov esi, eax
call fcn.004dca10
test ebx, ebx
je 0x500b3c
push edi
push str.Error_Setting_FilePtr_on__s_
jmp 0x500b33
push 0
lea edx, [esp + 0x1c]
push edx
push pe_nt_image_headers32
lea eax, [esp + 0x90]
push eax
push ebp
call esi
test eax, eax
jne 0x500766
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x10]
push ecx
mov esi, eax
call fcn.004dca10
test ebx, ebx
je 0x500b3c
push edi
push str.Error_Reading_file_1___s_
jmp 0x500b33
cmp dword [esp + 0x18], 0xf8
je 0x500795
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [esp + 0x10]
push edx
mov esi, eax
call fcn.004dca10
test ebx, ebx
je 0x500b3c
push edi
push str.Unable_to_read_NTHeaders_from__s_
jmp 0x500b33
mov al, byte [esp + 0x88]
mov cl, byte [esp + 0x89]
xor esi, esi
mov dword [esp + 0x14], esi
mov byte [esp + 0x14], al
mov byte [esp + 0x15], cl
mov eax, dword [esp + 0x14]
cmp eax, 0x14c
je 0x5007e8
cmp eax, 0x8664
je 0x5007e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [esp + 0x10]
push edx
mov esi, eax
call fcn.004dca10
test ebx, ebx
je 0x500b3c
push edi
push str.Neither_i386_nor_AMD64:__s_
jmp 0x500b33
movsx eax, byte [esp + 0x84]
push eax
call fcn.005e3ae6
add esp, 4
cmp eax, 0x50
jne 0x500af9
movsx ecx, byte [esp + 0x85]
push ecx
call fcn.005e3ae6
add esp, 4
cmp eax, 0x45
jne 0x500af9
cmp byte [esp + 0x86], 0
jne 0x500af9
cmp byte [esp + 0x87], 0
jne 0x500af9
lea edx, [esp + 0xfc]
mov dword [esp + 0x28], esi
mov dword [esp + 0x14], edx
mov ecx, dword [esp + 0x14]
mov edi, dword [ecx + 4]
mov eax, dword [ecx]
test edi, edi
je 0x500996
push 0
push 0
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x5009b2
cmp dword [esp + 0x20], 0
je 0x50090f
lea eax, [edi - 0x11]
cmp eax, 0x5ffee
ja 0x500996
push edi
call fcn.004d9470
mov esi, eax
add esp, 4
test esi, esi
je 0x500996
push 0
lea ecx, [esp + 0x1c]
push ecx
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5009db
cmp byte [esi + 0xc], 6
jne 0x5008d9
cmp byte [esi + 0xd], 9
jne 0x5008d9
cmp byte [esi + 0xe], 0x2a
jne 0x5008d9
cmp byte [esi + 0xf], 0x86
jne 0x5008d9
cmp byte [esi + 9], 0x82
jne 0x5008d9
cmp byte [esi + 8], 0x30
je 0x500a0d
cmp byte [esi + 0xd], 6
jne 0x500901
cmp byte [esi + 0xe], 9
jne 0x500901
cmp byte [esi + 0xf], 0x2a
jne 0x500901
cmp byte [esi + 0x10], 0x86
jne 0x500901
cmp byte [esi + 9], 0x83
jne 0x500901
cmp byte [esi + 8], 0x30
je 0x500a0d
push esi
call fcn.005e0865
add esp, 4
jmp 0x500996
xor eax, eax
push eax
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x39], eax
mov dword [esp + 0x3d], eax
mov dword [esp + 0x41], eax
mov word [esp + 0x45], ax
mov byte [esp + 0x47], al
push 0x10
lea eax, [esp + 0x3c]
push eax
push ebp
mov byte [esp + 0x44], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x500abe
cmp byte [esp + 0x3c], 6
mov al, byte [esp + 0x3d]
jne 0x50096b
cmp al, 9
jne 0x50096b
cmp byte [esp + 0x3e], 0x2a
jne 0x500996
cmp byte [esp + 0x3f], 0x86
jne 0x500996
cmp byte [esp + 0x39], 0x82
jmp 0x500989
cmp al, 6
jne 0x500996
cmp byte [esp + 0x3e], 9
jne 0x500996
cmp byte [esp + 0x3f], 0x2a
jne 0x500996
cmp byte [esp + 0x40], 0x86
jne 0x500996
cmp byte [esp + 0x39], 0x83
jne 0x500996
cmp byte [esp + 0x38], 0x30
je 0x500a38
mov eax, dword [esp + 0x28]
add dword [esp + 0x14], 8
inc eax
cmp eax, 0x10
mov dword [esp + 0x28], eax
jl 0x500847
jmp 0x500a3c
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x10]
push ecx
mov esi, eax
call fcn.004dca10
test ebx, ebx
je 0x500b3c
mov edx, dword [esp + 0x1c]
push edx
push str.Error_Setting_FilePtr_on__s_
jmp 0x500b33
push esi
call fcn.005e0865
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
lea eax, [esp + 0x10]
push eax
call fcn.004dca10
test ebx, ebx
je 0x500b3c
mov ecx, dword [esp + 0x1c]
push ecx
push str.Error_Reading_file_2a___s_
jmp 0x500b33
mov edx, dword [esp + 0x18]
push edx
push str.MicroWorld_Technologies
push esi
call fcn.004f5ad0
add esp, 0xc
cmp eax, 0xffffffff
je 0x500a2f
mov eax, dword [esp + 0x20]
mov dword [eax], 1
push esi
call fcn.005e0865
add esp, 4
mov dword [esp + 0x24], edi
lea eax, [esp + 0x10]
push eax
call fcn.004dca10
cmp dword [esp + 0x24], 0
jne 0x500ae0
test ebx, ebx
je 0x500a68
mov ecx, dword [esp + 0x1c]
push ecx
push str.Unable_to_find_Verisign_Sign_in_file__s_
push ebx
call fcn.005dfb23
add esp, 0xc
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x500b43
push str.updll6.dll
push eax
call fcn.004dd6e0
add esp, 8
test eax, eax
jne 0x500b43
mov eax, dword [esp + 0x20]
test eax, eax
je 0x500aa0
mov dword [eax], 1
mov eax, 1
pop esi
pop ebp
pop edi
pop ebx
mov ecx, dword [esp + 0x270]
xor ecx, esp
call fcn.005dfbbe
add esp, 0x274
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x10]
push ecx
mov esi, eax
call fcn.004dca10
test ebx, ebx
je 0x500b3c
mov edx, dword [esp + 0x1c]
push edx
push str.Error_Reading_file_2___s_
jmp 0x500b33
test ebx, ebx
je 0x500aa0
mov edx, dword [esp + 0x1c]
push edx
push str.Found_Verisign_Sign_in_file__s
push ebx
call fcn.005dfb23
add esp, 0xc
jmp 0x500aa0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
lea eax, [esp + 0x10]
push eax
call fcn.004dca10
test ebx, ebx
je 0x500b3c
push edi
push str.Not_a_PE_file:__s_
jmp 0x500b33
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x10]
push ecx
mov esi, eax
call fcn.004dca10
test ebx, ebx
je 0x500b3c
push edi
push str.Not_an_MZ_Executable:__s_
push ebx
call fcn.005dfb23
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x500aa5
mov ecx, dword [esp + 0x278]
pop edi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.005dfbbe
add esp, 0x274
ret