Function at 0x4aec40
Capabilities:
Read file on windows
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x9d0
mov eax, dword [0x4da8f0]
xor eax, esp
mov dword [esp + 0x9cc], eax
mov eax, dword [0x5097e4]
push ebp
xor ebp, ebp
push esi
push edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0xc], ebp
mov dword [0x5097f4], 0xf4240
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x4aec73
sub eax, edx
sar eax, 1
mov esi, eax
mov eax, dword [0x508354]
lea edi, [eax + esi*2 - 8]
cmp esi, 4
jb 0x4aecfc
cmp word [edi], 0x2e
jne 0x4aecfc
movzx ecx, word [edi + 2]
push ecx
call fcn.004b2511
add esp, 4
cmp eax, 0x5a
jne 0x4aecfc
movzx eax, word [edi + 4]
cmp ax, 0x30
jb 0x4aecfc
cmp ax, 0x39
ja 0x4aecfc
movzx eax, word [edi + 6]
cmp ax, 0x30
jb 0x4aecfc
cmp ax, 0x39
ja 0x4aecfc
cmp esi, 4
je 0x4aecdf
movzx eax, word [edi + 8]
cmp ax, 0x30
jb 0x4aecfc
cmp ax, 0x39
ja 0x4aecfc
pop edi
pop esi
mov eax, 3
pop ebp
mov ecx, dword [esp + 0x9cc]
xor ecx, esp
call fcn.004b102c
add esp, 0x9d0
ret
mov edx, dword [0x5097e4]
push ebx
push 0x4c9110
push edx
call fcn.004b3ef0
add esp, 8
mov dword [0x5097e0], eax
cmp eax, ebp
jne 0x4aed35
mov eax, dword [0x5097e4]
push eax
push ebp
mov ecx, 0x508304
call fcn.0042d4c0
mov eax, dword [0x5097f4]
jmp 0x4af050
push 2
push 0xffffffffffffffff
push 0xfffc0000
push eax
call fcn.004b3fa3
add esp, 0x10
test eax, eax
je 0x4aed9a
mov ecx, dword [0x5097e0]
push ebp
push ebp
push ebp
push ecx
call fcn.004b3fa3
add esp, 0x10
test eax, eax
je 0x4aed9a
mov edx, dword [0x5097e0]
push edx
call fcn.004b3dae
mov eax, dword [0x5097e4]
add esp, 4
push eax
push 0x204
mov dword [0x5097e0], ebp
call fcn.004671c0
push eax
push ebp
call fcn.0049ac10
add esp, 0xc
mov eax, 0xb
jmp 0x4af870
mov eax, dword [0x5097e0]
mov edi, 0x4cf5c0
call fcn.004ab0b0
test eax, eax
je 0x4aeefa
mov ecx, dword [0x5097e0]
push ecx
call fcn.004b433e
mov esi, eax
mov eax, dword [0x5097e0]
add esp, 4
mov ebx, edx
call fcn.004ab0b0
test eax, eax
je 0x4aedf8
mov edx, dword [0x5097e0]
push edx
call fcn.004b433e
mov esi, eax
mov eax, dword [0x5097e0]
add esp, 4
mov edi, 0x4cf5c0
mov ebx, edx
call fcn.004ab0b0
test eax, eax
jne 0x4aedd2
mov eax, dword [0x5097e0]
push ebp
push ebx
push esi
push eax
call fcn.004b3fa3
add esp, 0x10
test eax, eax
jne 0x4aef1c
mov eax, dword [0x5097e0]
push eax
push 0x12
lea ecx, [esp + 0x28]
push 1
push ecx
call fcn.004b3d1a
add esp, 0x10
cmp eax, 0x12
jb 0x4aeefa
movzx dx, byte [esp + 0x21]
movzx ecx, byte [esp + 0x20]
shl dx, 8
movzx eax, dx
or eax, ecx
inc eax
lea edx, [eax - 1]
mov dword [0x5097f4], eax
mov dword [0x5097f8], edx
cmp eax, 0x10000
jae 0x4aee7e
movzx cx, byte [esp + 0x23]
shl cx, 8
movzx edx, cx
movzx ecx, byte [esp + 0x22]
or edx, ecx
cmp edx, eax
jbe 0x4aee7e
mov dword [0x5097f4], ebp
jmp 0x4aef07
movzx cx, byte [esp + 0x31]
movzx dx, byte [esp + 0x30]
shl cx, 8
or cx, dx
mov word [0x50834c], cx
je 0x4aeeff
movzx eax, cx
inc eax
push eax
call fcn.004b1137
add esp, 4
mov dword [0x509880], eax
cmp eax, ebp
je 0x4af8ba
mov ecx, dword [0x5097e0]
movzx edx, word [0x50834c]
push ecx
push 1
push edx
push eax
call fcn.004b3d1a
add esp, 0x10
cmp eax, 1
je 0x4aeee9
mov eax, dword [0x509880]
push eax
call fcn.004b1201
add esp, 4
mov dword [0x509880], ebp
jmp 0x4aeefa
movzx ecx, word [0x50834c]
mov edx, dword [0x509880]
mov byte [ecx + edx], 0
mov eax, dword [0x5097f4]
cmp eax, ebp
jne 0x4af02b
mov eax, dword [0x5097e0]
push ebp
push ebp
push ebp
push eax
call fcn.004b3fa3
add esp, 0x10
test eax, eax
je 0x4aef56
mov ecx, dword [0x5097e0]
push ecx
call fcn.004b3dae
mov edx, dword [0x5097e4]
add esp, 4
push edx
push 0x204
mov dword [0x5097e0], ebp
call fcn.004671c0
push eax
push ebp
call fcn.0049ac10
add esp, 0xc
mov eax, 0xb
jmp 0x4af870
mov esi, dword [0x5097e0]
call fcn.004aaff0
mov esi, eax
cmp esi, ebp
je 0x4af026
mov eax, dword [0x5097e0]
push eax
call fcn.004b433e
add esp, 4
mov dword [0x509800], eax
mov dword [0x509804], edx
cmp eax, 4
jne 0x4aeffc
cmp edx, ebp
jne 0x4aeffe
mov ecx, 0x4cf5d8
mov edx, 0x54b6ec
call fcn.004ab120
test eax, eax
je 0x4af007
mov esi, dword [0x5097e0]
call fcn.004aaff0
mov esi, eax
mov eax, dword [0x5097f4]
cmp esi, ebp
je 0x4af02b
cmp eax, ebp
jne 0x4af02b
mov ecx, dword [0x5097e0]
push ecx
call fcn.004b433e
add esp, 4
mov dword [0x509800], eax
mov dword [0x509804], edx
cmp eax, 8
jne 0x4af026
cmp edx, ebp
jne 0x4af026
mov ecx, 0x4cf5c8
mov edx, 0x54b6ec
call fcn.004ab120
test eax, eax
je 0x4af026
mov eax, 1
mov dword [0x5097f4], eax
jmp 0x4af02b
cmp edx, ebp
ja 0x4aefad
jb 0x4af007
cmp eax, 4
ja 0x4aefad
mov ecx, 0x4cf5d8
mov edx, 0x54b6ec
call fcn.004ab120
test eax, eax
je 0x4aefad
mov eax, 0x1869f
mov dword [0x5097f4], eax
jmp 0x4aefb2
mov eax, dword [0x5097f4]
cmp dword [0x4d8f40], ebp
jne 0x4af03f
mov eax, 1
mov dword [0x5097f4], eax
jmp 0x4af076
cmp eax, 0xf4240
jne 0x4af050
mov eax, 1
mov dword [0x5097f4], eax
cmp dword [0x4d8f40], ebp
je 0x4af076
mov ecx, dword [0x5097e0]
cmp ecx, ebp
je 0x4af076
push ecx
call fcn.004b3dae
mov eax, dword [0x5097f4]
add esp, 4
mov dword [0x5097e0], ebp
xor ecx, ecx
mov dword [0x5097f8], ecx
cmp eax, ebp
jbe 0x4af86e
mov edx, dword [0x5097e4]
push ecx
push edx
call fcn.00438540
mov ebx, eax
mov eax, dword [0x5097e0]
mov dword [esp + 0x18], ebx
cmp eax, ebp
jne 0x4af116
push 0x4c9110
push ebx
call fcn.004b3ef0
add esp, 8
mov dword [0x5097e0], eax
cmp eax, ebp
jne 0x4af116
lea esp, [esp]
mov eax, dword [0x5097f8]
push eax
call fcn.00438e90
cmp eax, 9
je 0x4af889
cmp eax, 2
je 0x4af89c
cmp eax, 3
je 0x4af855
mov ecx, dword [0x5097f8]
mov edx, dword [0x5097e4]
push ecx
push edx
call fcn.00438540
mov ebx, eax
push 0x4c9110
push ebx
mov dword [esp + 0x20], ebx
call fcn.004b3ef0
add esp, 8
mov dword [0x5097e0], eax
cmp eax, ebp
je 0x4af0c0
mov esi, eax
call fcn.004aaff0
test eax, eax
je 0x4af82d
mov eax, dword [0x5097e0]
push eax
call fcn.004b433e
add esp, 4
mov dword [0x509800], eax
mov dword [0x509804], edx
xor eax, eax
mov cl, byte [eax + 0x54b6ec]
cmp cl, byte [eax + 0x4cf5c0]
jne 0x4af154
inc eax
cmp eax, 4
jl 0x4af140
cmp eax, 4
je 0x4af814
xor eax, eax
nop
mov dl, byte [eax + 0x54b6ec]
cmp dl, byte [eax + 0x4cf5a8]
jne 0x4af174
inc eax
cmp eax, 4
jl 0x4af160
cmp eax, 4
je 0x4af814
xor eax, eax
nop
mov cl, byte [eax + 0x54b6ec]
cmp cl, byte [eax + 0x4cf5b0]
jne 0x4af194
inc eax
cmp eax, 4
jl 0x4af180
cmp eax, 4
je 0x4af814
xor eax, eax
nop
mov dl, byte [eax + 0x54b6ec]
cmp dl, byte [eax + 0x4cf5c8]
jne 0x4af1b4
inc eax
cmp eax, 4
jl 0x4af1a0
cmp eax, 4
jne 0x4af2c5
push 0x80
call fcn.004b1137
mov esi, eax
add esp, 4
cmp esi, ebp
je 0x4af8ba
xor eax, eax
xor ecx, ecx
xor edx, edx
push esi
mov word [esi], ax
mov word [esi + 2], cx
mov word [esi + 4], dx
mov word [esi + 6], ax
mov dword [esi + 8], ebp
mov dword [esi + 0xc], ebp
mov dword [esi + 0x10], ebp
mov dword [esi + 0x14], ebp
mov dword [esi + 0x18], ebp
mov dword [esi + 0x1c], ebp
mov word [esi + 0x20], cx
mov word [esi + 0x24], dx
mov word [esi + 0x26], ax
mov dword [esi + 0x28], ebp
mov word [esi + 0x2c], cx
mov dword [esi + 0x38], ebp
mov dword [esi + 0x30], ebp
mov dword [esi + 0x34], ebp
mov dword [esi + 0x48], ebp
mov dword [esi + 0x44], ebp
mov dword [esi + 0x40], ebp
mov dword [esi + 0x4c], ebp
mov dword [esi + 0x3c], ebp
mov dword [esi + 0x50], ebp
mov dword [esi + 0x54], ebp
mov dword [esi + 0x5c], ebp
mov dword [esi + 0x58], ebp
call fcn.004ad7a0
mov edx, dword [esi + 0x54]
mov edi, eax
push edx
mov dword [esp + 0x18], edi
call fcn.00470bb0
push eax
push 0x268
call fcn.004671c0
push eax
lea eax, [esp + 0x54]
push eax
mov edx, 0x4c8
call fcn.00483770
add esp, 0xc
lea ecx, [esp + 0x4c]
push ecx
call fcn.0048d380
call fcn.0044d040
cmp byte [0x51c858], 0
jne 0x4af895
cmp dword [esp + 0x10], ebp
je 0x4af28b
mov dword [esp + 0x10], ebp
cmp edi, 2
je 0x4af82d
cmp dword [esp + 0x14], ebp
jne 0x4af814
inc dword [0x508350]
mov eax, 0x509878
cmp dword [0x509878], ebp
je 0x4af2b5
mov eax, dword [esp + 0x1c]
mov dword [eax], esi
lea eax, [esi + 0x78]
mov dword [eax], ebp
mov dword [esp + 0x1c], eax
jmp 0x4af814
xor eax, eax
jmp 0x4af2d0
mov dl, byte [eax + 0x54b6ec]
cmp dl, byte [eax + 0x4cf5b8]
jne 0x4af2e4
inc eax
cmp eax, 4
jl 0x4af2d0
cmp eax, 4
jne 0x4af7f2
cmp dword [esp + 0x10], ebp
jne 0x4af359
mov ecx, dword [0x508350]
cmp ecx, ebp
je 0x4af359
lea eax, [ecx*4]
mov edx, eax
shr edx, 2
cmp edx, ecx
jne 0x4af8ba
push eax
call fcn.004b1137
add esp, 4
mov dword [0x508348], eax
cmp eax, ebp
je 0x4af8ba
mov ecx, dword [0x509878]
cmp ecx, ebp
je 0x4af342
mov dword [eax], ecx
mov ecx, dword [ecx + 0x78]
add eax, 4
cmp ecx, ebp
jne 0x4af331
mov eax, dword [0x508348]
mov ecx, dword [0x508350]
push 0x4a9bf0
push 4
push ecx
push eax
call fcn.004b3590
add esp, 0x10
mov edx, dword [0x5097e0]
push edx
push 1
lea eax, [esp + 0x28]
push 0x2a
push eax
mov dword [esp + 0x20], 1
call fcn.004b3d1a
add esp, 0x10
cmp eax, 1
jne 0x4af814
push 0x80
call fcn.004b1137
mov esi, eax
add esp, 4
cmp esi, ebp
je 0x4af8ba
movzx ecx, byte [esp + 0x21]
movzx edx, byte [esp + 0x20]
movzx eax, byte [esp + 0x23]
shl cx, 8
or cx, dx
movzx edx, byte [esp + 0x25]
mov word [esi], cx
movzx ecx, byte [esp + 0x22]
shl ax, 8
or ax, cx
movzx ecx, byte [esp + 0x27]
mov word [esi + 2], ax
movzx eax, byte [esp + 0x24]
shl dx, 8
or dx, ax
movzx eax, byte [esp + 0x2b]
mov word [esi + 4], dx
movzx edx, byte [esp + 0x26]
shl cx, 8
or cx, dx
movzx edx, byte [esp + 0x2a]
shl ax, 8
mov word [esi + 6], cx
movzx ecx, ax
movzx eax, byte [esp + 0x29]
or ecx, edx
shl ax, 8
movzx edx, ax
movzx eax, byte [esp + 0x28]
shl ecx, 0x10
or ecx, edx
or ecx, eax
movzx eax, byte [esp + 0x2e]
mov dword [esi + 8], ecx
movzx ecx, byte [esp + 0x2f]
shl cx, 8
movzx edx, cx
movzx ecx, byte [esp + 0x2d]
or edx, eax
shl cx, 8
movzx eax, cx
movzx ecx, byte [esp + 0x2c]
shl edx, 0x10
or edx, eax
or edx, ecx
movzx ecx, byte [esp + 0x32]
mov dword [esi + 0xc], edx
movzx edx, byte [esp + 0x33]
shl dx, 8
movzx eax, dx
movzx edx, byte [esp + 0x31]
or eax, ecx
shl eax, 0x10
shl dx, 8
movzx ecx, dx
movzx edx, byte [esp + 0x30]
or eax, ecx
or eax, edx
movzx edx, byte [esp + 0x36]
mov dword [esi + 0x10], eax
movzx eax, byte [esp + 0x37]
shl ax, 8
movzx ecx, ax
movzx eax, byte [esp + 0x35]
or ecx, edx
shl ax, 8
movzx edx, ax
movzx eax, byte [esp + 0x34]
shl ecx, 0x10
or ecx, edx
movzx edx, byte [esp + 0x3b]
or ecx, eax
movzx ax, byte [esp + 0x39]
mov dword [esi + 0x18], ecx
movzx ecx, byte [esp + 0x38]
shl ax, 8
or ax, cx
mov dword [esi + 0x14], ebp
mov dword [esi + 0x1c], ebp
mov word [esi + 0x20], ax
shl dx, 8
movzx ecx, byte [esp + 0x3a]
or dx, cx
movzx ecx, byte [esp + 0x3c]
mov word [esi + 0x24], dx
movzx edx, byte [esp + 0x3d]
shl dx, 8
or dx, cx
mov word [esi + 0x26], dx
movzx edx, byte [esp + 0x3f]
shl dx, 8
movzx ecx, dx
movzx edx, byte [esp + 0x3e]
or ecx, edx
movzx edx, byte [esp + 0x40]
mov dword [esi + 0x28], ecx
movzx ecx, byte [esp + 0x41]
shl cx, 8
or cx, dx
mov word [esi + 0x2c], cx
movzx ecx, byte [esp + 0x45]
shl cx, 8
movzx edx, cx
movzx ecx, byte [esp + 0x44]
or edx, ecx
movzx ecx, byte [esp + 0x43]
shl cx, 8
shl edx, 0x10
movzx ecx, cx
or edx, ecx
movzx ecx, byte [esp + 0x42]
or edx, ecx
mov dword [esi + 0x38], edx
movzx edx, byte [esp + 0x49]
shl dx, 8
movzx ecx, dx
movzx edx, byte [esp + 0x48]
or ecx, edx
movzx edx, byte [esp + 0x47]
shl dx, 8
movzx edx, dx
shl ecx, 0x10
or ecx, edx
movzx edx, byte [esp + 0x46]
or ecx, edx
mov dword [esi + 0x30], ecx
mov dword [esi + 0x34], ebp
mov dword [esi + 0x44], ebp
mov dword [esi + 0x40], ebp
mov dword [esi + 0x4c], ebp
mov dword [esi + 0x3c], ebp
mov dword [esi + 0x50], ebp
mov dword [esi + 0x54], ebp
mov dword [esi + 0x48], ebp
mov dword [esi + 0x5c], ebp
mov dword [esi + 0x58], ebp
cmp ax, bp
je 0x4af814
movzx eax, ax
inc eax
push eax
call fcn.004b1137
mov edi, eax
add esp, 4
mov dword [esi + 0x4c], edi
cmp edi, ebp
je 0x4af8ba
movzx ebx, word [esi + 0x24]
cmp bx, bp
je 0x4af5d3
movzx ecx, bx
inc ecx
push ecx
call fcn.004b1137
add esp, 4
mov dword [esi + 0x44], eax
cmp eax, ebp
je 0x4af8ba
movzx ebp, word [esi + 0x26]
test bp, bp
je 0x4af5f4
movzx edx, bp
inc edx
push edx
call fcn.004b1137
add esp, 4
mov dword [esi + 0x48], eax
test eax, eax
je 0x4af8ba
mov eax, dword [0x5097e0]
movzx ecx, word [esi + 0x20]
push eax
push 1
push ecx
push edi
call fcn.004b3d1a
add esp, 0x10
cmp eax, 1
jne 0x4af814
test bx, bx
je 0x4af639
mov edx, dword [0x5097e0]
mov ecx, dword [esi + 0x44]
push edx
push eax
movzx eax, bx
push eax
push ecx
call fcn.004b3d1a
add esp, 0x10
cmp eax, 1
jne 0x4af814
test bp, bp
je 0x4af660
mov edx, dword [0x5097e0]
mov ecx, dword [esi + 0x48]
push edx
movzx eax, bp
push 1
push eax
push ecx
call fcn.004b3d1a
add esp, 0x10
cmp eax, 1
jne 0x4af814
movzx edx, word [esi + 0x20]
push edi
mov byte [edx + edi], 0
call fcn.004a9cb0
mov edi, eax
test edi, edi
je 0x4af814
mov eax, dword [edi + 8]
cmp eax, dword [esi + 8]
jne 0x4af814
cmp dword [edi + 0x58], 0
movzx ecx, word [esi]
mov edx, dword [esi + 0x44]
mov eax, dword [esi + 0x48]
mov word [edi], cx
movzx ecx, word [esi + 0x2c]
mov dword [edi + 0x44], edx
mov edx, dword [esi + 0x38]
mov word [edi + 0x24], bx
mov word [edi + 0x26], bp
mov dword [edi + 0x48], eax
mov word [edi + 0x2c], cx
mov dword [edi + 0x38], edx
jne 0x4af6df
mov eax, 0x800
test word [edi + 4], ax
je 0x4af6d9
mov ecx, dword [edi + 0x4c]
push ecx
call fcn.004c23c7
add esp, 4
mov dword [edi + 0x58], eax
test eax, eax
jne 0x4af6df
push 4
call fcn.004a78d0
jmp 0x4af6df
push edi
call fcn.004aa0d0
movzx eax, word [edi]
movzx ecx, al
shr ax, 8
test ax, ax
jne 0x4af706
test dword [edi + 0x38], 0xffff0000
je 0x4af717
cmp ecx, 0x19
je 0x4af706
cmp ecx, 0x1a
je 0x4af706
cmp ecx, 0x28
jne 0x4af717
cmp ax, 6
je 0x4af717
cmp ax, 0xb
jne 0x4af722
cmp ecx, 0x32
jne 0x4af722
mov eax, dword [edi + 0x4c]
push eax
push eax
call dword [sym.imp.USER32.dll_OemToCharA]
movzx eax, word [edi]
movzx ecx, al
shr ax, 8
test ax, ax
jne 0x4af749
test dword [edi + 0x38], 0xffff0000
je 0x4af75a
cmp ecx, 0x19
je 0x4af749
cmp ecx, 0x1a
je 0x4af749
cmp ecx, 0x28
jne 0x4af75a
cmp ax, 6
je 0x4af75a
cmp ax, 0xb
jne 0x4af765
cmp ecx, 0x32
jne 0x4af765
mov eax, dword [edi + 0x48]
push eax
push eax
call dword [sym.imp.USER32.dll_OemToCharA]
mov edx, dword [0x5097dc]
push edx
call fcn.004b433e
mov ecx, dword [edi + 0x30]
mov esi, eax
mov eax, dword [edi + 0x34]
push 0
push eax
mov ebx, edx
mov edx, dword [0x5097dc]
push ecx
push edx
call fcn.004b3fa3
add esp, 0x14
test eax, eax
jne 0x4af8a3
push 1
push edi
call fcn.004ac8c0
mov eax, dword [0x5097dc]
push 0
push ebx
push esi
push eax
call fcn.004b3fa3
add esp, 0x10
test eax, eax
jne 0x4af8ae
mov ecx, dword [0x5097dc]
push ecx
call fcn.004b433e
add esp, 4
cmp esi, eax
jne 0x4af7cf
cmp ebx, edx
je 0x4af814
mov edx, dword [0x5097e0]
push edx
call fcn.004b3dae
add esp, 4
mov dword [0x5097e0], 0
mov eax, 0xe
jmp 0x4af870
cmp dword [0x509878], ebp
jne 0x4af814
xor eax, eax
lea esp, [esp]
mov dl, byte [eax + 0x54b6ec]
cmp dl, byte [eax + str.PK_a_b]
jne 0x4af814
inc eax
cmp eax, 4
jl 0x4af800
mov esi, dword [0x5097e0]
call fcn.004aaff0
mov ebx, dword [esp + 0x18]
xor ebp, ebp
test eax, eax
jne 0x4af125
mov eax, dword [0x5097e0]
cmp eax, ebp
je 0x4af83f
push eax
call fcn.004b3dae
add esp, 4
push ebx
mov dword [0x5097e0], ebp
call fcn.004b1201
add esp, 4
cmp dword [esp + 0x14], 2
je 0x4af86e
mov ecx, dword [0x5097f8]
inc ecx
mov dword [0x5097f8], ecx
cmp ecx, dword [0x5097f4]
jb 0x4af086
xor eax, eax
mov ecx, dword [esp + 0x9dc]
pop ebx
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.004b102c
add esp, 0x9d0
ret
push ebx
push ebp
mov ecx, 0x508304
call fcn.0042d4c0
mov eax, 9
jmp 0x4af870
mov eax, 2
jmp 0x4af870
mov eax, dword [0x5097e0]
push eax
jmp 0x4af7d6
mov ecx, dword [0x5097e0]
push ecx
jmp 0x4af7d6
mov eax, 4
jmp 0x4af870