Function at 0x100035c0
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0x48
push ebx
xor eax, eax
push ebp
push esi
push edi
mov esi, ecx
or dword [esi + 0x50], 0x800
xor edi, edi
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x5c]
mov ebx, edx
xor ebp, ebp
cmp eax, edi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x28], edi
mov byte [esp + 0x13], 0
mov dword [esp + 0x14], 0x30c1
je 0x1000361e
push 8
push eax
call dword [sym.imp.KERNEL32.dll_IsBadWritePtr]
test eax, eax
je 0x1000361e
mov dword [esp + 0x5c], edi
push 1
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
mov dword [esp + 0x24], eax
jne 0x10003641
mov dword [esp + 0x14], 0x30c2
jmp 0x10003f14
mov ecx, esi
call fcn.1000b200
cmp dword [esp + 0x60], edi
mov ebx, 0x18
je 0x10003688
mov eax, dword [esp + 0x18]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x10003674
mov dword [esp + 0x14], 0x30c2
jmp 0x10003f14
mov ebx, ebp
sub ebx, dword [esp + 0x24]
cmp ebx, 0x18
jb 0x10003797
mov ebx, 0x18
mov eax, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x20]
push ecx
push ebx
lea edx, [esp + 0x4c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10003634
cmp dword [esp + 0x1c], ebx
jne 0x10003634
cmp word [esp + 0x40], di
jne 0x10003c4b
cmp ebx, 0x18
jne 0x10003c4b
mov ax, word [esp + 0x42]
cmp ax, 0x78
je 0x100036d3
cmp ax, 0xdc
jne 0x10003f14
mov eax, dword [esp + 0x44]
cmp eax, 0x18
jb 0x10003f14
cmp word [esp + 0x50], di
jl 0x10003f14
cmp word [esp + 0x52], di
jl 0x10003f14
cmp byte [esp + 0x54], 0
mov ebx, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea ebp, [eax - 0x18]
mov dword [esp + 0x20], ebp
je 0x10003731
push 4
lea ebp, [esi + 0xac]
push ebp
push 0xffffffffffffffff
lea ecx, [esp + 0x60]
push ecx
push 0
push 0
mov byte [esp + 0x6f], 0
call ebx
test eax, eax
jne 0x1000372d
mov word [ebp], di
mov ebp, dword [esp + 0x20]
mov cx, word [esp + 0x50]
movsx eax, cx
add eax, 1
cmp eax, ebp
mov dword [esp + 0x38], eax
ja 0x10003f14
sub ebp, eax
test cx, cx
je 0x10003954
lea edx, [eax + eax]
mov eax, dword [0x1001bf40]
push edx
push 8
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
mov dword [esi + 0x58], eax
je 0x10003f14
mov ecx, dword [esp + 0x38]
mov edx, dword [0x1001bf40]
push ecx
push 8
push edx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
jne 0x100037ad
mov dword [esp + 0x14], 0x30c1
jmp 0x10003e58
cmp ebx, 2
jae 0x10003688
mov dword [esp + 0x14], 0x30c2
jmp 0x10003f14
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x18]
push 0
lea eax, [esp + 0x20]
push eax
push ecx
push edi
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1000398b
mov eax, dword [esp + 0x38]
cmp dword [esp + 0x1c], eax
jne 0x1000398b
movsx ecx, word [esp + 0x50]
push eax
mov eax, dword [esi + 0x58]
push eax
push ecx
push edi
push 0
push 0
call ebx
test eax, eax
mov dword [esi + 0x5c], eax
jne 0x1000380c
mov edx, dword [esi + 0x58]
push edx
push eax
mov eax, dword [0x1001bf40]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [esi + 0x58], 0
mov ecx, dword [0x1001bf40]
push edi
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor edi, edi
mov cx, word [esp + 0x52]
movsx eax, cx
add eax, 1
cmp eax, ebp
mov dword [esp + 0x38], eax
ja 0x10003f14
sub ebp, eax
test cx, cx
mov dword [esp + 0x20], ebp
je 0x10003998
mov ecx, dword [0x1001bf40]
lea eax, [eax + eax + 0xa]
push eax
push 8
push ecx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x10003f14
mov edx, dword [esp + 0x38]
mov eax, dword [0x1001bf40]
push edx
push 8
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebp, eax
test ebp, ebp
je 0x10003e58
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x20]
push ecx
push edx
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1000397b
mov eax, dword [esp + 0x38]
cmp dword [esp + 0x1c], eax
jne 0x1000397b
movsx ecx, word [esp + 0x52]
push eax
push edi
push ecx
push ebp
push 0
push 0
call ebx
test eax, eax
jne 0x100038d1
mov edx, dword [0x1001bf40]
push edi
push eax
push edx
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor edi, edi
mov eax, dword [0x1001bf40]
push ebp
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test edi, edi
je 0x10003917
push 0
mov edx, edi
mov ecx, esi
call fcn.10002990
mov ecx, edi
mov dword [esi + 0x64], eax
call fcn.10009f50
push edi
mov dword [esi + 0x60], eax
mov ecx, dword [0x1001bf40]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor edi, edi
cmp dword [esi + 0x60], edi
je 0x10003f14
cmp word [esp + 0x50], 0
jne 0x100039bf
mov eax, dword [esp + 0x20]
test eax, eax
mov dword [esp + 0x28], 0x100
je 0x10003dd0
mov edx, dword [esp + 0x18]
push eax
mov ecx, esi
call fcn.1000ab60
test eax, eax
mov dword [esp + 0x14], eax
jne 0x10003e58
jmp 0x10003dd0
mov edx, dword [esp + 0x18]
push 1
push 0
push 1
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x1000381e
mov dword [esp + 0x14], 0x30c2
jmp 0x10003f14
mov edx, dword [0x1001bf40]
push ebp
push 0
push edx
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [esp + 0x14], 0x30c2
jmp 0x10003e58
mov eax, dword [esp + 0x18]
push 1
push 0
push 1
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x10003917
mov dword [esp + 0x14], 0x30c2
jmp 0x10003f14
cmp word [esp + 0x42], 0xdc
jne 0x10003dd0
mov ebx, dword [esp + 0x20]
cmp ebx, 0xc
jb 0x10003dd0
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
nop
mov eax, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x20]
push ecx
push 0xc
lea edx, [esp + 0x40]
push edx
push eax
call ebp
test eax, eax
je 0x1000398b
cmp dword [esp + 0x1c], 0xc
jne 0x1000398b
mov ecx, dword [esp + 0x34]
sub ebx, 0xc
test ecx, ecx
je 0x10003dd0
mov eax, dword [esp + 0x38]
test eax, eax
je 0x10003c3d
cmp ebx, eax
jb 0x10003dd0
sub ebx, eax
sub ecx, 1
mov dword [esp + 0x20], ebx
je 0x10003bac
sub ecx, 1
je 0x10003b0f
sub ecx, 1
je 0x10003a5e
mov ecx, dword [esp + 0x18]
push 1
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x1000398b
jmp 0x10003c3d
push eax
lea ebx, [esi + 0xac]
mov word [ebx], 0
mov edx, dword [0x1001bf40]
push 8
push edx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x10003f14
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x18]
push 0
lea eax, [esp + 0x20]
push eax
push ecx
push edi
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1000398b
mov eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x38]
jne 0x1000398b
mov ecx, edi
call fcn.1000b5b0
mov ebp, eax
test ebp, ebp
jge 0x10003adf
mov ecx, dword [0x1001bf40]
push edi
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, dword [esp + 0x20]
xor edi, edi
jmp 0x10003c3d
je 0x10003afa
cmp ebp, 3
jl 0x10003aeb
mov ebp, 3
lea edx, [ebp + ebp]
push edx
push edi
push ebx
call fcn.1000ed10
add esp, 0xc
push edi
mov word [esi + ebp*2 + 0xac], 0
mov eax, dword [0x1001bf40]
push 0
push eax
jmp 0x10003ac8
mov ecx, dword [esi + 0x60]
test ecx, ecx
je 0x10003b26
call fcn.1000a270
mov eax, dword [esp + 0x38]
mov dword [esi + 0x60], 0
mov ecx, dword [0x1001bf40]
add eax, 0xa
push eax
push 8
push ecx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x10003f14
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x18]
push 0
lea edx, [esp + 0x20]
push edx
push eax
push edi
push ecx
call ebp
test eax, eax
je 0x1000398b
mov edx, dword [esp + 0x1c]
cmp edx, dword [esp + 0x38]
jne 0x1000398b
push 0
mov edx, edi
mov ecx, esi
call fcn.10002990
mov ecx, edi
mov dword [esi + 0x64], eax
call fcn.10009f50
push edi
mov dword [esi + 0x60], eax
mov eax, dword [0x1001bf40]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor edi, edi
cmp dword [esi + 0x60], edi
jne 0x10003c3d
mov dword [esp + 0x14], 0x3242
jmp 0x10003f14
mov ecx, dword [esi + 0x58]
test ecx, ecx
je 0x10003bcf
push ecx
mov ecx, dword [0x1001bf40]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
mov dword [esi + 0x58], eax
mov dword [esi + 0x5c], eax
mov eax, dword [esp + 0x38]
mov edx, dword [0x1001bf40]
add eax, 4
push eax
push 8
push edx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
mov dword [esi + 0x58], eax
je 0x10003e58
mov edx, dword [esp + 0x38]
push 0
lea ecx, [esp + 0x20]
push ecx
push edx
push eax
mov eax, dword [esp + 0x28]
push eax
call ebp
test eax, eax
je 0x1000398b
mov ecx, dword [esp + 0x1c]
cmp ecx, dword [esp + 0x38]
jne 0x1000398b
mov ecx, dword [esi + 0x58]
call fcn.1000b5b0
test eax, eax
jg 0x10003c3d
mov edx, dword [esi + 0x58]
mov eax, dword [0x1001bf40]
push edx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
mov dword [esi + 0x58], eax
mov dword [esi + 0x5c], eax
cmp ebx, 0xc
jae 0x100039e0
jmp 0x10003dd0
cmp dword [esp + 0x60], edi
je 0x10003cb6
mov ebx, dword [esp + 0x24]
mov ecx, dword [esp + 0x18]
xor eax, eax
push eax
push eax
push ebx
push ecx
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x38], 0x100
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x10003c97
mov dword [esp + 0x14], 0x30c2
jmp 0x10003f14
mov edx, dword [esp + 0x18]
sub ebp, ebx
push ebp
mov ecx, esi
call fcn.1000ab60
test eax, eax
mov dword [esp + 0x14], eax
jne 0x10003f14
jmp 0x10003dd0
mov edx, dword [0x1001bf40]
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 0x8c
push 8
push edx
call ebx
mov edi, eax
test edi, edi
je 0x10003f14
mov eax, dword [esp + 0x40]
mov dword [edi], eax
mov ecx, dword [esp + 0x44]
mov dword [edi + 4], ecx
mov edx, dword [esp + 0x48]
mov dword [edi + 8], edx
mov eax, dword [esp + 0x4c]
mov dword [edi + 0xc], eax
mov ecx, dword [esp + 0x50]
push 0
mov dword [edi + 0x10], ecx
mov edx, dword [esp + 0x58]
lea eax, [esp + 0x20]
push eax
push 0x74
lea ecx, [edi + 0x18]
mov dword [edi + 0x14], edx
mov edx, dword [esp + 0x24]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1000398b
cmp dword [esp + 0x1c], 0x74
jne 0x1000398b
mov ecx, edi
call fcn.1000b530
mov ebp, eax
lea eax, [ebp - 1]
cmp eax, 0x8a
ja 0x10003e58
mov dword [esi + 0x5c], ebp
add ebp, 1
cmp word [edi + ebp], 0xa
jne 0x10003e58
mov edx, dword [0x1001bf40]
lea ecx, [ebp + ebp]
push ecx
push 8
push edx
call ebx
test eax, eax
mov dword [esi + 0x58], eax
je 0x10003e58
push ebp
push eax
mov eax, dword [esi + 0x5c]
push eax
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
mov dword [esi + 0x5c], eax
jne 0x10003d9e
mov ecx, dword [esi + 0x58]
mov edx, dword [0x1001bf40]
push ecx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [esi + 0x58], 0
mov eax, dword [0x1001bf40]
push edi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
xor edi, edi
add ebp, 2
mov dword [esp + 0x44], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x44], ebp
lea ecx, [esi + 0xac]
xor ebx, ebx
cmp word [ecx], bx
je 0x10003dff
mov edx, ecx
nop
movzx eax, word [edx]
cmp ax, 0x41
jb 0x10003df5
cmp ax, 0x5a
ja 0x10003df5
add eax, 0x20
mov word [edx], ax
add ecx, 2
cmp word [ecx], bx
mov edx, ecx
jne 0x10003de0
cmp dword [esi + 0x58], ebx
mov byte [esp + 0x13], 1
jne 0x10003e27
cmp dword [esi + 0x70], ebx
jne 0x10003e27
mov ecx, dword [esi + 0x60]
cmp ecx, ebx
je 0x10003e1d
call fcn.1000a270
mov dword [esi + 0x64], ebx
mov dword [esp + 0x28], 0x100
jmp 0x10003e54
push ebx
push ebx
push ebx
push ebx
xor edx, edx
mov ecx, esi
call fcn.10007e70
test dword [esi + 0x50], 0x100
mov dword [esp + 0x14], eax
jne 0x10003e48
cmp eax, 0x3144
jne 0x10003e58
cmp dword [esi + 0x70], ebx
je 0x10003e54
mov ecx, esi
call fcn.1000a9a0
mov dword [esp + 0x14], ebx
test edi, edi
je 0x10003e6c
mov ecx, dword [0x1001bf40]
push edi
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [esp + 0x14], 0
jne 0x10003f0d
mov edx, dword [esp + 0x4e]
or edx, dword [esp + 0x4c]
and dword [esi + 0x50], 0xfffff9ff
test dx, dx
mov eax, dword [esi + 0x50]
je 0x10003ed2
lea edx, [esp + 0x2c]
xor ecx, ecx
call fcn.1000b2d0
mov eax, dword [esp + 0x2c]
movzx ecx, word [esp + 0x4c]
mov edi, dword [sym.imp.KERNEL32.dll_MulDiv]
push 0x5a0
push eax
push ecx
call edi
mov edx, dword [esp + 0x30]
mov dword [esi + 0x40], eax
movzx eax, word [esp + 0x4e]
push 0x5a0
push edx
push eax
call edi
or dword [esi + 0x50], 0x400
mov dword [esi + 0x44], eax
jmp 0x10003ef7
mov ecx, dword [esp + 0x4a]
or ecx, dword [esp + 0x48]
test cx, cx
je 0x10003ef7
movsx edx, word [esp + 0x48]
movsx ecx, word [esp + 0x4a]
or eax, 0x200
mov dword [esi + 0x40], edx
mov dword [esi + 0x44], ecx
mov dword [esi + 0x50], eax
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x18]
push 0
push 0
add eax, edx
push eax
push ecx
jmp 0x10003f2e
cmp byte [esp + 0x13], 0
jne 0x10003f1b
mov ecx, esi
call fcn.1000b200
mov eax, dword [esp + 0x24]
cmp eax, 0xffffffff
je 0x10003f34
mov edx, dword [esp + 0x18]
push 0
push 0
push eax
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x10003f4e
mov ecx, dword [esi + 0x50]
mov edx, dword [esi + 0x4c]
push ecx
push eax
push edx
xor edx, edx
mov ecx, esi
call fcn.1000c0a0
mov eax, dword [esp + 0x60]
and dword [esi + 0x50], 0xfffff7ff
test eax, eax
je 0x10003f6d
mov ecx, dword [eax + 0x1c]
and ecx, 0xfffffeff
or ecx, dword [esp + 0x28]
mov dword [eax + 0x1c], ecx
mov ecx, esi
call fcn.10002610
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret 8