Function at 0x4ad040
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x9d0
mov eax, dword [0x4d8620]
xor eax, esp
mov dword [esp + 0x9cc], eax
mov eax, dword [0x514de4]
push ebp
xor ebp, ebp
push esi
push edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0xc], ebp
mov dword [0x514df4], 0xf4240
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x4ad073
sub eax, edx
sar eax, 1
mov esi, eax
mov eax, dword [0x513954]
lea edi, [eax + esi*2 - 8]
cmp esi, 4
jb 0x4ad0fc
cmp word [edi], 0x2e
jne 0x4ad0fc
movzx ecx, word [edi + 2]
push ecx
call fcn.004b08d1
add esp, 4
cmp eax, 0x5a
jne 0x4ad0fc
movzx eax, word [edi + 4]
cmp ax, 0x30
jb 0x4ad0fc
cmp ax, 0x39
ja 0x4ad0fc
movzx eax, word [edi + 6]
cmp ax, 0x30
jb 0x4ad0fc
cmp ax, 0x39
ja 0x4ad0fc
cmp esi, 4
je 0x4ad0df
movzx eax, word [edi + 8]
cmp ax, 0x30
jb 0x4ad0fc
cmp ax, 0x39
ja 0x4ad0fc
pop edi
pop esi
mov eax, 3
pop ebp
mov ecx, dword [esp + 0x9cc]
xor ecx, esp
call fcn.004af00b
add esp, 0x9d0
ret
mov edx, dword [0x514de4]
push ebx
push 0x4c7100
push edx
call fcn.004b23c0
add esp, 8
mov dword [0x514de0], eax
cmp eax, ebp
jne 0x4ad135
mov eax, dword [0x514de4]
push eax
push ebp
mov ecx, 0x513904
call fcn.0042a120
mov eax, dword [0x514df4]
jmp 0x4ad450
push 2
push 0xffffffffffffffff
push 0xfffc0000
push eax
call fcn.004b2473
add esp, 0x10
test eax, eax
je 0x4ad19a
mov ecx, dword [0x514de0]
push ebp
push ebp
push ebp
push ecx
call fcn.004b2473
add esp, 0x10
test eax, eax
je 0x4ad19a
mov edx, dword [0x514de0]
push edx
call fcn.004b227e
mov eax, dword [0x514de4]
add esp, 4
push eax
push 0x204
mov dword [0x514de0], ebp
call fcn.00466160
push eax
push ebp
call fcn.00498e30
add esp, 0xc
mov eax, 0xb
jmp 0x4adc70
mov eax, dword [0x514de0]
mov edi, 0x4cd950
call fcn.004a94b0
test eax, eax
je 0x4ad2fa
mov ecx, dword [0x514de0]
push ecx
call fcn.004b280e
mov esi, eax
mov eax, dword [0x514de0]
add esp, 4
mov ebx, edx
call fcn.004a94b0
test eax, eax
je 0x4ad1f8
mov edx, dword [0x514de0]
push edx
call fcn.004b280e
mov esi, eax
mov eax, dword [0x514de0]
add esp, 4
mov edi, 0x4cd950
mov ebx, edx
call fcn.004a94b0
test eax, eax
jne 0x4ad1d2
mov eax, dword [0x514de0]
push ebp
push ebx
push esi
push eax
call fcn.004b2473
add esp, 0x10
test eax, eax
jne 0x4ad31c
mov eax, dword [0x514de0]
push eax
push 0x12
lea ecx, [esp + 0x28]
push 1
push ecx
call fcn.004b21ea
add esp, 0x10
cmp eax, 0x12
jb 0x4ad2fa
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 [0x514df4], eax
mov dword [0x514df8], edx
cmp eax, 0x10000
jae 0x4ad27e
movzx cx, byte [esp + 0x23]
shl cx, 8
movzx edx, cx
movzx ecx, byte [esp + 0x22]
or edx, ecx
cmp edx, eax
jbe 0x4ad27e
mov dword [0x514df4], ebp
jmp 0x4ad307
movzx cx, byte [esp + 0x31]
movzx dx, byte [esp + 0x30]
shl cx, 8
or cx, dx
mov word [0x51394c], cx
je 0x4ad2ff
movzx eax, cx
inc eax
push eax
call fcn.004af0e6
add esp, 4
mov dword [0x514e80], eax
cmp eax, ebp
je 0x4adcba
mov ecx, dword [0x514de0]
movzx edx, word [0x51394c]
push ecx
push 1
push edx
push eax
call fcn.004b21ea
add esp, 0x10
cmp eax, 1
je 0x4ad2e9
mov eax, dword [0x514e80]
push eax
call fcn.004af1b0
add esp, 4
mov dword [0x514e80], ebp
jmp 0x4ad2fa
movzx ecx, word [0x51394c]
mov edx, dword [0x514e80]
mov byte [ecx + edx], 0
mov eax, dword [0x514df4]
cmp eax, ebp
jne 0x4ad42b
mov eax, dword [0x514de0]
push ebp
push ebp
push ebp
push eax
call fcn.004b2473
add esp, 0x10
test eax, eax
je 0x4ad356
mov ecx, dword [0x514de0]
push ecx
call fcn.004b227e
mov edx, dword [0x514de4]
add esp, 4
push edx
push 0x204
mov dword [0x514de0], ebp
call fcn.00466160
push eax
push ebp
call fcn.00498e30
add esp, 0xc
mov eax, 0xb
jmp 0x4adc70
mov esi, dword [0x514de0]
call fcn.004a93f0
mov esi, eax
cmp esi, ebp
je 0x4ad426
mov eax, dword [0x514de0]
push eax
call fcn.004b280e
add esp, 4
mov dword [0x514e00], eax
mov dword [0x514e04], edx
cmp eax, 4
jne 0x4ad3fc
cmp edx, ebp
jne 0x4ad3fe
mov ecx, 0x4cd968
mov edx, 0x571bd0
call fcn.004a9520
test eax, eax
je 0x4ad407
mov esi, dword [0x514de0]
call fcn.004a93f0
mov esi, eax
mov eax, dword [0x514df4]
cmp esi, ebp
je 0x4ad42b
cmp eax, ebp
jne 0x4ad42b
mov ecx, dword [0x514de0]
push ecx
call fcn.004b280e
add esp, 4
mov dword [0x514e00], eax
mov dword [0x514e04], edx
cmp eax, 8
jne 0x4ad426
cmp edx, ebp
jne 0x4ad426
mov ecx, 0x4cd958
mov edx, 0x571bd0
call fcn.004a9520
test eax, eax
je 0x4ad426
mov eax, 1
mov dword [0x514df4], eax
jmp 0x4ad42b
cmp edx, ebp
ja 0x4ad3ad
jb 0x4ad407
cmp eax, 4
ja 0x4ad3ad
mov ecx, 0x4cd968
mov edx, 0x571bd0
call fcn.004a9520
test eax, eax
je 0x4ad3ad
mov eax, 0x1869f
mov dword [0x514df4], eax
jmp 0x4ad3b2
mov eax, dword [0x514df4]
cmp dword [0x4d6dc8], ebp
jne 0x4ad43f
mov eax, 1
mov dword [0x514df4], eax
jmp 0x4ad476
cmp eax, 0xf4240
jne 0x4ad450
mov eax, 1
mov dword [0x514df4], eax
cmp dword [0x4d6dc8], ebp
je 0x4ad476
mov ecx, dword [0x514de0]
cmp ecx, ebp
je 0x4ad476
push ecx
call fcn.004b227e
mov eax, dword [0x514df4]
add esp, 4
mov dword [0x514de0], ebp
xor ecx, ecx
mov dword [0x514df8], ecx
cmp eax, ebp
jbe 0x4adc6e
mov edx, dword [0x514de4]
push ecx
push edx
call fcn.00434f30
mov ebx, eax
mov eax, dword [0x514de0]
mov dword [esp + 0x18], ebx
cmp eax, ebp
jne 0x4ad516
push 0x4c7100
push ebx
call fcn.004b23c0
add esp, 8
mov dword [0x514de0], eax
cmp eax, ebp
jne 0x4ad516
lea esp, [esp]
mov eax, dword [0x514df8]
push eax
call fcn.00435890
cmp eax, 9
je 0x4adc89
cmp eax, 2
je 0x4adc9c
cmp eax, 3
je 0x4adc55
mov ecx, dword [0x514df8]
mov edx, dword [0x514de4]
push ecx
push edx
call fcn.00434f30
mov ebx, eax
push 0x4c7100
push ebx
mov dword [esp + 0x20], ebx
call fcn.004b23c0
add esp, 8
mov dword [0x514de0], eax
cmp eax, ebp
je 0x4ad4c0
mov esi, eax
call fcn.004a93f0
test eax, eax
je 0x4adc2d
mov eax, dword [0x514de0]
push eax
call fcn.004b280e
add esp, 4
mov dword [0x514e00], eax
mov dword [0x514e04], edx
xor eax, eax
mov cl, byte [eax + 0x571bd0]
cmp cl, byte [eax + 0x4cd950]
jne 0x4ad554
inc eax
cmp eax, 4
jl 0x4ad540
cmp eax, 4
je 0x4adc14
xor eax, eax
nop
mov dl, byte [eax + 0x571bd0]
cmp dl, byte [eax + 0x4cd938]
jne 0x4ad574
inc eax
cmp eax, 4
jl 0x4ad560
cmp eax, 4
je 0x4adc14
xor eax, eax
nop
mov cl, byte [eax + 0x571bd0]
cmp cl, byte [eax + 0x4cd940]
jne 0x4ad594
inc eax
cmp eax, 4
jl 0x4ad580
cmp eax, 4
je 0x4adc14
xor eax, eax
nop
mov dl, byte [eax + 0x571bd0]
cmp dl, byte [eax + 0x4cd958]
jne 0x4ad5b4
inc eax
cmp eax, 4
jl 0x4ad5a0
cmp eax, 4
jne 0x4ad6c5
push 0x80
call fcn.004af0e6
mov esi, eax
add esp, 4
cmp esi, ebp
je 0x4adcba
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.004abb80
mov edx, dword [esi + 0x54]
mov edi, eax
push edx
mov dword [esp + 0x18], edi
call fcn.0046f710
push eax
push 0x268
call fcn.00466160
push eax
lea eax, [esp + 0x54]
push eax
mov edx, 0x4c8
call fcn.004a5f50
add esp, 0xc
lea ecx, [esp + 0x4c]
push ecx
call fcn.0048b610
call fcn.0044b180
cmp byte [0x527e58], 0
jne 0x4adc95
cmp dword [esp + 0x10], ebp
je 0x4ad68b
mov dword [esp + 0x10], ebp
cmp edi, 2
je 0x4adc2d
cmp dword [esp + 0x14], ebp
jne 0x4adc14
inc dword [0x513950]
mov eax, 0x514e78
cmp dword [0x514e78], ebp
je 0x4ad6b5
mov eax, dword [esp + 0x1c]
mov dword [eax], esi
lea eax, [esi + 0x7c]
mov dword [eax], ebp
mov dword [esp + 0x1c], eax
jmp 0x4adc14
xor eax, eax
jmp 0x4ad6d0
mov dl, byte [eax + 0x571bd0]
cmp dl, byte [eax + 0x4cd948]
jne 0x4ad6e4
inc eax
cmp eax, 4
jl 0x4ad6d0
cmp eax, 4
jne 0x4adbf2
cmp dword [esp + 0x10], ebp
jne 0x4ad759
mov ecx, dword [0x513950]
cmp ecx, ebp
je 0x4ad759
lea eax, [ecx*4]
mov edx, eax
shr edx, 2
cmp edx, ecx
jne 0x4adcba
push eax
call fcn.004af0e6
add esp, 4
mov dword [0x513948], eax
cmp eax, ebp
je 0x4adcba
mov ecx, dword [0x514e78]
cmp ecx, ebp
je 0x4ad742
mov dword [eax], ecx
mov ecx, dword [ecx + 0x7c]
add eax, 4
cmp ecx, ebp
jne 0x4ad731
mov eax, dword [0x513948]
mov ecx, dword [0x513950]
push 0x4a7fe0
push 4
push ecx
push eax
call fcn.004b1a60
add esp, 0x10
mov edx, dword [0x514de0]
push edx
push 1
lea eax, [esp + 0x28]
push 0x2a
push eax
mov dword [esp + 0x20], 1
call fcn.004b21ea
add esp, 0x10
cmp eax, 1
jne 0x4adc14
push 0x80
call fcn.004af0e6
mov esi, eax
add esp, 4
cmp esi, ebp
je 0x4adcba
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 0x4adc14
movzx eax, ax
inc eax
push eax
call fcn.004af0e6
mov edi, eax
add esp, 4
mov dword [esi + 0x4c], edi
cmp edi, ebp
je 0x4adcba
movzx ebx, word [esi + 0x24]
cmp bx, bp
je 0x4ad9d3
movzx ecx, bx
inc ecx
push ecx
call fcn.004af0e6
add esp, 4
mov dword [esi + 0x44], eax
cmp eax, ebp
je 0x4adcba
movzx ebp, word [esi + 0x26]
test bp, bp
je 0x4ad9f4
movzx edx, bp
inc edx
push edx
call fcn.004af0e6
add esp, 4
mov dword [esi + 0x48], eax
test eax, eax
je 0x4adcba
mov eax, dword [0x514de0]
movzx ecx, word [esi + 0x20]
push eax
push 1
push ecx
push edi
call fcn.004b21ea
add esp, 0x10
cmp eax, 1
jne 0x4adc14
test bx, bx
je 0x4ada39
mov edx, dword [0x514de0]
mov ecx, dword [esi + 0x44]
push edx
push eax
movzx eax, bx
push eax
push ecx
call fcn.004b21ea
add esp, 0x10
cmp eax, 1
jne 0x4adc14
test bp, bp
je 0x4ada60
mov edx, dword [0x514de0]
mov ecx, dword [esi + 0x48]
push edx
movzx eax, bp
push 1
push eax
push ecx
call fcn.004b21ea
add esp, 0x10
cmp eax, 1
jne 0x4adc14
movzx edx, word [esi + 0x20]
push edi
mov byte [edx + edi], 0
call fcn.004a80a0
mov edi, eax
test edi, edi
je 0x4adc14
mov eax, dword [edi + 8]
cmp eax, dword [esi + 8]
jne 0x4adc14
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 0x4adadf
mov eax, 0x800
test word [edi + 4], ax
je 0x4adad9
mov ecx, dword [edi + 0x4c]
push ecx
call fcn.004c0797
add esp, 4
mov dword [edi + 0x58], eax
test eax, eax
jne 0x4adadf
push 4
call fcn.004a5c80
jmp 0x4adadf
push edi
call fcn.004a84c0
movzx eax, word [edi]
movzx ecx, al
shr ax, 8
test ax, ax
jne 0x4adb06
test dword [edi + 0x38], 0xffff0000
je 0x4adb17
cmp ecx, 0x19
je 0x4adb06
cmp ecx, 0x1a
je 0x4adb06
cmp ecx, 0x28
jne 0x4adb17
cmp ax, 6
je 0x4adb17
cmp ax, 0xb
jne 0x4adb22
cmp ecx, 0x32
jne 0x4adb22
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 0x4adb49
test dword [edi + 0x38], 0xffff0000
je 0x4adb5a
cmp ecx, 0x19
je 0x4adb49
cmp ecx, 0x1a
je 0x4adb49
cmp ecx, 0x28
jne 0x4adb5a
cmp ax, 6
je 0x4adb5a
cmp ax, 0xb
jne 0x4adb65
cmp ecx, 0x32
jne 0x4adb65
mov eax, dword [edi + 0x48]
push eax
push eax
call dword [sym.imp.USER32.dll_OemToCharA]
mov edx, dword [0x514ddc]
push edx
call fcn.004b280e
mov ecx, dword [edi + 0x30]
mov esi, eax
mov eax, dword [edi + 0x34]
push 0
push eax
mov ebx, edx
mov edx, dword [0x514ddc]
push ecx
push edx
call fcn.004b2473
add esp, 0x14
test eax, eax
jne 0x4adca3
push 1
push edi
call fcn.004aaca0
mov eax, dword [0x514ddc]
push 0
push ebx
push esi
push eax
call fcn.004b2473
add esp, 0x10
test eax, eax
jne 0x4adcae
mov ecx, dword [0x514ddc]
push ecx
call fcn.004b280e
add esp, 4
cmp esi, eax
jne 0x4adbcf
cmp ebx, edx
je 0x4adc14
mov edx, dword [0x514de0]
push edx
call fcn.004b227e
add esp, 4
mov dword [0x514de0], 0
mov eax, 0xe
jmp 0x4adc70
cmp dword [0x514e78], ebp
jne 0x4adc14
xor eax, eax
lea esp, [esp]
mov dl, byte [eax + 0x571bd0]
cmp dl, byte [eax + str.PK_a_b]
jne 0x4adc14
inc eax
cmp eax, 4
jl 0x4adc00
mov esi, dword [0x514de0]
call fcn.004a93f0
mov ebx, dword [esp + 0x18]
xor ebp, ebp
test eax, eax
jne 0x4ad525
mov eax, dword [0x514de0]
cmp eax, ebp
je 0x4adc3f
push eax
call fcn.004b227e
add esp, 4
push ebx
mov dword [0x514de0], ebp
call fcn.004af1b0
add esp, 4
cmp dword [esp + 0x14], 2
je 0x4adc6e
mov ecx, dword [0x514df8]
inc ecx
mov dword [0x514df8], ecx
cmp ecx, dword [0x514df4]
jb 0x4ad486
xor eax, eax
mov ecx, dword [esp + 0x9dc]
pop ebx
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.004af00b
add esp, 0x9d0
ret
push ebx
push ebp
mov ecx, 0x513904
call fcn.0042a120
mov eax, 9
jmp 0x4adc70
mov eax, 2
jmp 0x4adc70
mov eax, dword [0x514de0]
push eax
jmp 0x4adbd6
mov ecx, dword [0x514de0]
push ecx
jmp 0x4adbd6
mov eax, 4
jmp 0x4adc70