Function at 0x403989
Capabilities:
Get file size
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x427a73
mov eax, dword fs:[0]
push eax
sub esp, 0x190
mov eax, dword [0x4360c8]
xor eax, esp
mov dword [esp + 0x188], eax
push ebx
push esi
push edi
mov eax, dword [0x4360c8]
xor eax, esp
push eax
lea eax, [esp + 0x1a0]
mov dword fs:[0], eax
mov edi, ecx
push 1
mov dword [esp + 0x14], edi
mov dword [esp + 0x78], vtable.._AVNonErrMes__1__ThreadProc_CSetupHelper2_Auxiliary_Base_NekoGameSDK4th__UAEXXZ_.0
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov dword [esp + 0x78], eax
lea eax, [edi + 0xc8]
push eax
lea eax, [esp + 0x164]
xor ebx, ebx
push eax
mov dword [esp + 0x1b0], ebx
call fcn.004020cd
lea eax, [esp + 0x168]
push eax
mov byte [esp + 0x1b4], 1
call fcn.00402820
add esp, 0xc
cmp edx, dword [edi + 0x104]
ja 0x403a5d
jb 0x403a2a
cmp eax, dword [edi + 0x100]
ja 0x403a5d
push 0x10
push 0x42faf4
push 0x42fb00
push dword [edi + 0x8c]
call dword [sym.imp.USER32.dll_MessageBoxA]
push ebx
push 1
lea ecx, [esp + 0x168]
mov byte [edi + 0x149], 1
call fcn.0040313e
jmp 0x40455f
push ebx
push 1
lea ecx, [esp + 0x168]
mov byte [esp + 0x1b0], bl
call fcn.0040313e
lea eax, [edi + 0x188]
call fcn.00407621
test al, al
jne 0x403aa6
push 0x10
push 0x42fb64
push 0x42fb6c
push dword [edi + 0x8c]
call dword [sym.imp.USER32.dll_MessageBoxA]
mov byte [edi + 0x149], 1
jmp 0x40455f
push 0x4000
call fcn.004141cc
mov dword [esp + 0x68], eax
mov eax, dword [edi + 0xf8]
mov eax, dword [eax]
mov dword [esp + 0x5c], eax
mov eax, dword [edi + 0xe4]
pop ecx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x54], eax
mov esi, dword [edi + 0xf8]
mov eax, dword [edi + 0xe4]
cmp dword [esp + 0x54], ebx
je 0x403aeb
cmp dword [esp + 0x54], eax
je 0x403af0
call fcn.0041a87c
cmp dword [esp + 0x58], esi
je 0x404517
cmp byte [edi + 0xc], bl
je 0x4044a4
lea eax, [edi + 0x124]
mov dword [esp + 0x68], eax
lea eax, [edi + 0x194]
mov dword [esp + 0x2c], eax
lea eax, [edi + 0x108]
mov dword [esp + 0x30], eax
mov eax, vtable.NekoGameSDK4th::Base::File::CFileWin32.0
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ebx
mov byte [esp + 0x40], bl
mov byte [esp + 0x41], bl
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], ebx
mov byte [esp + 0x50], bl
mov byte [esp + 0x51], bl
push dword [esp + 0x2c]
lea ecx, [esp + 0x8c]
mov byte [esp + 0x1ac], 3
call fcn.004010a4
mov byte [esp + 0x1a8], 4
lea esi, [esp + 0x54]
mov byte [esp + 0x40], 1
call fcn.00405f24
push eax
lea eax, [esp + 0x164]
push eax
mov ecx, edi
call fcn.0040464a
mov ecx, dword [esp + 0x30]
push 0xffffffffffffffff
push ebx
push eax
mov byte [esp + 0x1b4], 5
call fcn.00402f3b
push ebx
push 1
lea ecx, [esp + 0x168]
mov byte [esp + 0x1b0], 4
call fcn.0040313e
call fcn.00405f24
push eax
lea eax, [esp + 0x164]
push eax
mov ecx, edi
call fcn.004045b8
mov ecx, dword [esp + 0x68]
push 0xffffffffffffffff
push ebx
push eax
mov byte [esp + 0x1b4], 6
call fcn.00402f3b
xor esi, esi
push ebx
inc esi
push esi
lea ecx, [esp + 0x168]
call fcn.0040313e
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x48]
call fcn.004073b1
test al, al
je 0x403c8a
push 0xf
pop esi
push ebx
lea ecx, [esp + 0x164]
mov dword [esp + 0x17c], esi
call fcn.00403203
push ebx
lea ecx, [esp + 0x180]
mov dword [esp + 0x198], esi
call fcn.00403203
mov ecx, dword [esp + 0x68]
lea eax, [esp + 0x17c]
push eax
lea ebx, [esp + 0x164]
mov byte [esp + 0x1ac], 8
call fcn.00401f1f
pop ecx
mov edi, ebx
lea ecx, [esp + 0x73]
call fcn.004021e7
mov eax, dword [esp + 0x68]
push 1
lea ecx, [esp + 0x3c]
call fcn.00407316
push 0
push 1
lea ecx, [esp + 0x184]
call fcn.0040313e
push 0
push 1
mov ecx, ebx
call fcn.0040313e
mov edi, dword [esp + 0x10]
xor esi, esi
xor ebx, ebx
inc esi
lea eax, [esp + 0x48]
call fcn.00407621
mov byte [esp + 0x1b], al
cmp al, bl
je 0x4041e4
lea eax, [esp + 0x38]
call fcn.00407621
test al, al
je 0x4041e4
lea ecx, [esp + 0x88]
mov byte [esp + 0x1a8], 3
call fcn.004010f9
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x50]
mov dword [esp + 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp + 0x6c], eax
cmp eax, 0xffffffff
jne 0x403cf6
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x403cf6
or dword [esp + 0x24], 0xffffffff
or dword [esp + 0x28], 0xffffffff
jmp 0x403d10
mov eax, dword [esp + 0x6c]
xor ecx, ecx
cmp dword [esp + 0x14], ebx
je 0x403d08
or eax, ebx
or ecx, dword [esp + 0x14]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ecx
push dword [esp + 0x2c]
lea ecx, [esp + 0xa4]
call fcn.004010a4
mov eax, dword [esp + 0x24]
and eax, dword [esp + 0x28]
mov byte [esp + 0x1a8], 0x17
cmp eax, 0xffffffff
jne 0x403dd4
push str.GetFileSizeError
lea ecx, [esp + 0x180]
call fcn.004032b4
push 0x42fc18
lea ecx, [esp + 0x164]
mov byte [esp + 0x1ac], 0x18
call fcn.004032b4
cmp dword [esp + 0x194], 0x10
mov ecx, dword [esp + 0x180]
jae 0x403d7b
lea ecx, [esp + 0x180]
cmp dword [esp + 0x178], 0x10
mov eax, dword [esp + 0x164]
jae 0x403d93
lea eax, [esp + 0x164]
push 0x15
push ecx
push eax
push dword [edi + 0x8c]
call dword [sym.imp.USER32.dll_MessageBoxA]
push ebx
lea ecx, [esp + 0x164]
push esi
cmp eax, 4
jne 0x4044ad
call fcn.0040313e
push ebx
push esi
lea ecx, [esp + 0x184]
call fcn.0040313e
lea ecx, [esp + 0xa0]
jmp 0x4043d4
lea ecx, [esp + 0xa0]
mov byte [esp + 0x1a8], 3
call fcn.004010f9
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
cmp byte [edi + 0xc], bl
je 0x404451
mov ecx, dword [esp + 0x20]
cmp ecx, dword [esp + 0x28]
ja 0x404451
jb 0x403e17
mov eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x24]
jae 0x404451
mov esi, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov eax, esi
sub eax, dword [esp + 0x1c]
sbb edx, ecx
mov dword [esp + 0x80], edx
jne 0x403e37
cmp eax, 0x4000
jb 0x403e3e
mov esi, 0x4000
jmp 0x403e42
sub esi, dword [esp + 0x1c]
push esi
push dword [esp + 0x68]
lea edi, [esp + 0x50]
call fcn.0040742e
test al, al
je 0x403eb7
push esi
push dword [esp + 0x68]
lea edi, [esp + 0x40]
call fcn.00407512
test al, al
je 0x40407e
push dword [esp + 0x2c]
lea ecx, [esp + 0x104]
call fcn.004010a4
add dword [esp + 0x1c], esi
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
adc dword [esp + 0x20], ebx
add ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x20]
adc edx, dword [esp + 0x60]
mov dword [eax + 0x140], ecx
lea ecx, [esp + 0x100]
mov dword [eax + 0x144], edx
call fcn.004010f9
mov edi, dword [esp + 0x10]
jmp 0x403df0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push ebx
lea ecx, [esp + 0x3c]
push ecx
push 0x400
push eax
push ebx
push 0x1300
mov dword [esp + 0x50], ebx
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push str.ReadFileError
lea ecx, [esp + 0x164]
call fcn.004032b4
push 0x42fc64
lea ecx, [esp + 0xb0]
mov byte [esp + 0x1ac], 0x1a
call fcn.004032b4
mov esi, eax
push 0x42fc74
lea ecx, [esp + 0xe8]
mov byte [esp + 0x1ac], 0x1b
call fcn.004032b4
mov edi, eax
push 0x42fca8
lea ecx, [esp + 0xcc]
mov byte [esp + 0x1ac], 0x1c
call fcn.004032b4
push eax
push dword [esp + 0x34]
lea eax, [esp + 0x114]
push eax
mov byte [esp + 0x1b4], 0x1d
call fcn.00402c36
add esp, 0xc
push edi
push eax
lea eax, [esp + 0x130]
push eax
mov byte [esp + 0x1b4], 0x1e
call fcn.00402c36
add esp, 0xc
push esi
push eax
lea eax, [esp + 0x14c]
push eax
mov byte [esp + 0x1b4], 0x1f
call fcn.00402c36
add esp, 0xc
mov byte [esp + 0x1a8], 0x20
push dword [esp + 0x34]
push eax
lea eax, [esp + 0x184]
push eax
call fcn.00404a81
add esp, 0xc
xor edi, edi
push ebx
inc edi
push edi
lea ecx, [esp + 0x14c]
call fcn.0040313e
push ebx
push edi
lea ecx, [esp + 0x130]
call fcn.0040313e
push ebx
push edi
lea ecx, [esp + 0x114]
call fcn.0040313e
push ebx
push edi
lea ecx, [esp + 0xd0]
call fcn.0040313e
push ebx
push edi
lea ecx, [esp + 0xec]
call fcn.0040313e
push ebx
push edi
lea ecx, [esp + 0xb4]
mov byte [esp + 0x1b0], 0x27
call fcn.0040313e
cmp dword [esp + 0x34], ebx
je 0x404017
push dword [esp + 0x34]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [esp + 0x178], 0x10
mov ecx, dword [esp + 0x164]
jae 0x40402f
lea ecx, [esp + 0x164]
cmp dword [esp + 0x194], 0x10
mov eax, dword [esp + 0x180]
jae 0x404047
lea eax, [esp + 0x180]
mov esi, dword [esp + 0x10]
push 0x15
push ecx
push eax
push dword [esi + 0x8c]
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 4
jne 0x4043f8
push ebx
push edi
lea ecx, [esp + 0x184]
call fcn.0040313e
lea ecx, [esp + 0x160]
jmp 0x4041c4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push ebx
lea ecx, [esp + 0x4c]
push ecx
push 0x400
push eax
push ebx
push 0x1300
mov dword [esp + 0x60], ebx
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push str.WriteFileError
lea ecx, [esp + 0x180]
call fcn.004032b4
push str.WindowsError:
lea ecx, [esp + 0xcc]
mov byte [esp + 0x1ac], 0x28
call fcn.004032b4
mov esi, eax
push 0x42fccc
lea ecx, [esp + 0xe8]
mov byte [esp + 0x1ac], 0x29
call fcn.004032b4
push esi
push eax
lea eax, [esp + 0xb4]
push eax
mov byte [esp + 0x1b4], 0x2a
call fcn.00402c36
add esp, 0xc
mov byte [esp + 0x1a8], 0x2b
push dword [esp + 0x44]
push eax
lea eax, [esp + 0x168]
push eax
call fcn.00404a81
add esp, 0xc
xor edi, edi
push ebx
inc edi
push edi
lea ecx, [esp + 0xb4]
call fcn.0040313e
push ebx
push edi
lea ecx, [esp + 0xec]
call fcn.0040313e
push ebx
push edi
lea ecx, [esp + 0xd0]
mov byte [esp + 0x1b0], 0x2f
call fcn.0040313e
cmp dword [esp + 0x44], ebx
je 0x404162
push dword [esp + 0x44]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [esp + 0x194], 0x10
mov ecx, dword [esp + 0x180]
jae 0x40417a
lea ecx, [esp + 0x180]
cmp dword [esp + 0x178], 0x10
mov eax, dword [esp + 0x164]
jae 0x404192
lea eax, [esp + 0x164]
mov esi, dword [esp + 0x10]
push 0x15
push ecx
push eax
push dword [esi + 0x8c]
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 4
jne 0x40441d
push ebx
push edi
lea ecx, [esp + 0x168]
call fcn.0040313e
lea ecx, [esp + 0x17c]
push ebx
push edi
call fcn.0040313e
lea ecx, [esp + 0x48]
call fcn.00407306
lea ecx, [esp + 0x38]
call fcn.00407306
mov edi, esi
jmp 0x403b21
mov dword [esp + 0x14], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push ebx
lea ecx, [esp + 0x1c]
push ecx
push 0x400
push eax
push ebx
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push ebx
lea ecx, [esp + 0x180]
mov dword [esp + 0x198], 0xf
call fcn.00403203
mov byte [esp + 0x1a8], 9
lea ecx, [esp + 0x17c]
cmp byte [esp + 0x1b], bl
jne 0x40423b
push str.FileLoadError
jmp 0x404240
push str.FileCreateError
call fcn.00403291
push 0x42fbb8
lea ecx, [esp + 0x148]
call fcn.004032b4
mov dword [esp + 0x7c], eax
push 0x42fbc8
lea ecx, [esp + 0x12c]
mov byte [esp + 0x1ac], 0xa
call fcn.004032b4
mov dword [esp + 0x6c], eax
push 0x42fc00
lea ecx, [esp + 0x110]
mov byte [esp + 0x1ac], 0xb
call fcn.004032b4
push eax
push dword [esp + 0x34]
lea eax, [esp + 0xd0]
push eax
mov byte [esp + 0x1b4], 0xc
call fcn.00402c36
add esp, 0xc
push dword [esp + 0x6c]
mov byte [esp + 0x1ac], 0xd
push eax
lea eax, [esp + 0xec]
push eax
call fcn.00402c36
add esp, 0xc
push dword [esp + 0x7c]
mov byte [esp + 0x1ac], 0xe
push eax
lea eax, [esp + 0xb4]
push eax
call fcn.00402c36
add esp, 0xc
mov byte [esp + 0x1a8], 0xf
push dword [esp + 0x14]
push eax
lea eax, [esp + 0x168]
push eax
call fcn.00404a81
add esp, 0xc
push ebx
push esi
lea ecx, [esp + 0xb4]
call fcn.0040313e
push ebx
push esi
lea ecx, [esp + 0xec]
call fcn.0040313e
push ebx
push esi
lea ecx, [esp + 0xd0]
call fcn.0040313e
push ebx
push esi
lea ecx, [esp + 0x114]
call fcn.0040313e
push ebx
push esi
lea ecx, [esp + 0x130]
call fcn.0040313e
push ebx
push esi
lea ecx, [esp + 0x14c]
call fcn.0040313e
cmp dword [esp + 0x14], ebx
je 0x404368
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [esp + 0x194], 0x10
mov ecx, dword [esp + 0x180]
jae 0x404380
lea ecx, [esp + 0x180]
cmp dword [esp + 0x178], 0x10
mov eax, dword [esp + 0x164]
jae 0x404398
lea eax, [esp + 0x164]
push 0x15
push ecx
push eax
push dword [edi + 0x8c]
call dword [sym.imp.USER32.dll_MessageBoxA]
push ebx
lea ecx, [esp + 0x164]
push esi
cmp eax, 4
jne 0x4044d0
call fcn.0040313e
push ebx
push esi
lea ecx, [esp + 0x184]
call fcn.0040313e
lea ecx, [esp + 0x88]
mov byte [esp + 0x1a8], 3
call fcn.004010f9
lea ecx, [esp + 0x48]
call fcn.00407306
lea ecx, [esp + 0x38]
call fcn.00407306
jmp 0x403b21
mov ecx, esi
mov byte [esi + 0x149], 1
call fcn.004078d0
push ebx
push edi
lea ecx, [esp + 0x184]
call fcn.0040313e
lea ecx, [esp + 0x160]
jmp 0x404440
mov ecx, esi
mov byte [esi + 0x149], 1
call fcn.004078d0
push ebx
push edi
lea ecx, [esp + 0x168]
call fcn.0040313e
lea ecx, [esp + 0x17c]
push ebx
push edi
mov byte [esp + 0x1b0], 3
call fcn.0040313e
mov edi, esi
push dword [esp + 0x2c]
lea ecx, [esp + 0x98]
call fcn.004010a4
mov eax, dword [esp + 0x24]
add dword [esp + 0x5c], eax
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x94]
adc dword [esp + 0x60], eax
call fcn.004010f9
lea ecx, [esp + 0x48]
call fcn.00407306
lea ecx, [esp + 0x38]
mov byte [esp + 0x1a8], bl
call fcn.00407306
lea esi, [esp + 0x54]
call fcn.0040de1d
jmp 0x403ad3
mov byte [edi + 0x149], 1
jmp 0x404517
mov byte [edi + 0x149], 1
call fcn.0040313e
push ebx
push esi
lea ecx, [esp + 0x184]
call fcn.0040313e
lea ecx, [esp + 0xa0]
jmp 0x4044f1
mov byte [edi + 0x149], 1
call fcn.0040313e
push ebx
push esi
lea ecx, [esp + 0x184]
call fcn.0040313e
lea ecx, [esp + 0x88]
mov byte [esp + 0x1a8], 3
call fcn.004010f9
lea ecx, [esp + 0x48]
call fcn.00407306
lea ecx, [esp + 0x38]
mov byte [esp + 0x1a8], bl
call fcn.00407306
lea eax, [edi + 0x194]
push eax
lea ecx, [esp + 0x98]
call fcn.004010a4
push dword [esp + 0x64]
call fcn.0041aaca
mov eax, dword [edi + 0x100]
mov dword [edi + 0x140], eax
mov eax, dword [edi + 0x104]
pop ecx
lea ecx, [esp + 0x94]
mov dword [edi + 0x144], eax
mov byte [edi + 0x148], 1
call fcn.004010f9
lea ecx, [esp + 0x74]
call fcn.0040458c
mov ecx, dword [esp + 0x1a0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x188]
xor ecx, esp
call fcn.004197af
mov esp, ebp
pop ebp
ret