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

Disassembly:
push 0xffffffffffffffff
push 0x100ab38c
mov eax, dword fs:[0]
push eax
sub esp, 0x128
mov eax, dword [0x100d8dd0]
xor eax, esp
mov dword [esp + 0x124], eax
push ebp
push esi
push edi
mov eax, dword [0x100d8dd0]
xor eax, esp
push eax
lea eax, [esp + 0x138]
mov dword fs:[0], eax
mov ecx, dword [ebx + 4]
lea eax, [esp + 0x14]
push eax
xor esi, esi
push ecx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x100213ce
call fcn.100208d0
jmp 0x100213d6
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov edi, dword [ebx + 0x28]
xor ecx, ecx
cmp edx, ecx
jl 0x100218de
jg 0x100213ed
cmp eax, edi
jbe 0x100218de
mov edx, dword [ebx + 4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
lea ebp, [ebx + 8]
mov dword [ebx + 4], 0xffffffff
cmp dword [ebp + 0x18], 8
jb 0x1002140e
mov eax, dword [ebp + 4]
jmp 0x10021411
lea eax, [ebp + 4]
xor edi, edi
push edi
push 0x88000080
push 4
push edi
push 7
push 4
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebx + 4], eax
cmp eax, 0xffffffff
jne 0x1002147a
push 0x15
push str.Cant_reopen_log_file
lea ecx, [esp + 0x28]
mov dword [esp + 0x40], 0xf
mov dword [esp + 0x3c], edi
mov byte [esp + 0x2c], 0
call fcn.1004d8d0
mov dword [esp + 0x140], edi
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0xb0]
call fcn.1004a900
push 0x100c84c4
lea ecx, [esp + 0xb0]
push ecx
call fcn.1007fcc5
lea edx, [esp + 0x14]
push edx
push eax
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x10021499
call fcn.100208d0
jmp 0x100214a1
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov edi, dword [ebx + 0x28]
xor ecx, ecx
cmp edx, ecx
jl 0x100218de
jg 0x100214b8
cmp eax, edi
jbe 0x100218de
mov ecx, dword [ebx + 4]
push ecx
call esi
push ebp
lea edx, [esp + 0xb0]
push edx
mov dword [ebx + 4], 0xffffffff
call fcn.100239a0
mov dword [esp + 0x140], 1
lea edi, [ebx + 0x24]
mov ecx, edi
lea edx, [esp + 0x58]
call fcn.10020cc0
mov byte [esp + 0x140], 2
push eax
lea eax, [esp + 0x78]
push eax
mov ecx, ebp
call fcn.10020d40
add esp, 8
mov byte [esp + 0x140], 3
push eax
lea ecx, [esp + 0x11c]
call fcn.10025530
mov byte [esp + 0x140], 5
mov esi, 8
cmp dword [esp + 0x8c], esi
jb 0x1002153c
mov ecx, dword [esp + 0x78]
push ecx
call fcn.1007c941
add esp, 4
xor edx, edx
mov dword [esp + 0x8c], 7
mov dword [esp + 0x88], 0
mov word [esp + 0x78], dx
mov byte [esp + 0x140], 6
cmp dword [esp + 0x70], esi
jb 0x10021574
mov eax, dword [esp + 0x5c]
push eax
call fcn.1007c941
add esp, 4
xor ecx, ecx
lea esi, [esp + 0x118]
mov dword [esp + 0x70], 7
mov dword [esp + 0x6c], 0
mov word [esp + 0x5c], cx
call fcn.10020b00
mov esi, dword [edi]
dec esi
mov dword [esp + 0x14], esi
cmp esi, 1
jb 0x10021764
jmp 0x100215b0
lea ecx, [esp + 0x14]
lea edx, [esp + 0x74]
call fcn.10020cc0
mov byte [esp + 0x140], 7
push eax
lea edx, [esp + 0x5c]
push edx
mov ecx, ebp
call fcn.10020d40
add esp, 8
mov byte [esp + 0x140], 8
push eax
lea ecx, [esp + 0x94]
call fcn.10025530
mov byte [esp + 0x140], 0xa
mov edi, 8
cmp dword [esp + 0x70], edi
jb 0x1002160a
mov eax, dword [esp + 0x5c]
push eax
call fcn.1007c941
add esp, 4
xor ecx, ecx
mov dword [esp + 0x70], 7
mov dword [esp + 0x6c], 0
mov word [esp + 0x5c], cx
mov byte [esp + 0x140], 0xb
cmp dword [esp + 0x8c], edi
jb 0x1002163f
mov edx, dword [esp + 0x78]
push edx
call fcn.1007c941
add esp, 4
xor eax, eax
lea ecx, [esp + 0x90]
mov dword [esp + 0x8c], 7
mov dword [esp + 0x88], 0
mov word [esp + 0x78], ax
call fcn.10023a20
test al, al
je 0x10021740
lea ecx, [esi + 1]
mov dword [esp + 0x14], ecx
lea ecx, [esp + 0x14]
lea edx, [esp + 0x20]
call fcn.10020cc0
mov byte [esp + 0x140], 0xc
push eax
lea edx, [esp + 0x40]
push edx
mov ecx, ebp
call fcn.10020d40
add esp, 8
mov byte [esp + 0x140], 0xd
push eax
lea ecx, [esp + 0xd8]
call fcn.10025530
mov byte [esp + 0x140], 0xf
cmp dword [esp + 0x54], edi
jb 0x100216cc
mov eax, dword [esp + 0x40]
push eax
call fcn.1007c941
add esp, 4
xor ecx, ecx
mov dword [esp + 0x54], 7
mov dword [esp + 0x50], 0
mov word [esp + 0x40], cx
mov byte [esp + 0x140], 0x10
cmp dword [esp + 0x38], edi
jb 0x100216fe
mov edx, dword [esp + 0x24]
push edx
call fcn.1007c941
add esp, 4
lea ecx, [esp + 0x90]
xor eax, eax
push ecx
lea edi, [esp + 0xd8]
mov dword [esp + 0x3c], 7
mov dword [esp + 0x38], 0
mov word [esp + 0x28], ax
call fcn.10021220
add esp, 4
mov byte [esp + 0x140], 0xb
mov ecx, edi
call fcn.10025810
mov edi, 8
mov byte [esp + 0x140], 6
lea ecx, [esp + 0x90]
call fcn.10025810
dec esi
mov dword [esp + 0x14], esi
cmp esi, 1
jae 0x100215b0
jmp 0x10021769
mov edi, 8
lea ecx, [esp + 0x14]
lea edx, [esp + 0x3c]
mov dword [esp + 0x14], 1
call fcn.100210b0
mov byte [esp + 0x140], 0x11
push eax
lea edx, [esp + 0x24]
push edx
mov ecx, ebp
call fcn.10020d40
add esp, 8
mov byte [esp + 0x140], 0x12
push eax
lea ecx, [esp + 0x100]
call fcn.10025530
mov byte [esp + 0x140], 0x14
cmp dword [esp + 0x38], edi
jb 0x100217c6
mov eax, dword [esp + 0x24]
push eax
call fcn.1007c941
add esp, 4
mov esi, 7
xor ecx, ecx
mov dword [esp + 0x38], esi
mov dword [esp + 0x34], 0
mov word [esp + 0x24], cx
mov byte [esp + 0x140], 0x15
cmp dword [esp + 0x54], edi
jb 0x100217f9
mov edx, dword [esp + 0x40]
push edx
call fcn.1007c941
add esp, 4
lea ecx, [esp + 0xac]
xor eax, eax
push ecx
lea edi, [esp + 0x100]
mov dword [esp + 0x58], esi
mov dword [esp + 0x54], 0
mov word [esp + 0x44], ax
call fcn.10021220
add esp, 4
cmp dword [ebp + 0x18], 8
jb 0x1002182e
mov ebp, dword [ebp + 4]
jmp 0x10021831
add ebp, 4
push 0
push 0x88000080
push 4
push 0
push 7
push 4
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebx + 4], eax
cmp eax, 0xffffffff
jne 0x1002189f
push 0x14
push str.Cannot_open_log_file
lea ecx, [esp + 0x28]
mov dword [esp + 0x40], 0xf
mov dword [esp + 0x3c], 0
mov byte [esp + 0x2c], 0
call fcn.1004d8d0
mov byte [esp + 0x140], 0x16
lea edx, [esp + 0x20]
push edx
lea ecx, [esp + 0xd8]
call fcn.1004a900
push 0x100c84c4
lea eax, [esp + 0xd8]
push eax
call fcn.1007fcc5
mov byte [esp + 0x140], 6
lea ecx, [esp + 0xfc]
call fcn.10025810
mov byte [esp + 0x140], 1
lea ecx, [esp + 0x118]
call fcn.10025810
mov dword [esp + 0x140], 0xffffffff
lea ecx, [esp + 0xac]
call fcn.10025810
mov ecx, dword [esp + 0x138]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x124]
xor ecx, esp
call fcn.1007c94c
add esp, 0x134
ret