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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46b03c
mov eax, dword fs:[0]
push eax
sub esp, 0x1f0
mov eax, dword [0x49f080]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x1c], 0
cmp dword [esi + 0x14], 7
mov dword [ebp - 0x24], eax
mov eax, esi
mov dword [ebp - 0x2c], esi
jbe 0x43668d
mov eax, dword [esi]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x28], eax
cmp eax, 0xffffffff
jne 0x436851
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x4a1990]
cmp eax, dword [ecx + 4]
jle 0x4366fb
push 0x4a1990
call fcn.00443b49
add esp, 4
cmp dword [0x4a1990], 0xffffffff
jne 0x4366fb
push 0x46b8f0
mov dword [0x4a19c4], 0
call fcn.00443861
push 0x4a1990
call fcn.00443af8
add esp, 8
push 0x13
xorps xmm0, xmm0
mov dword [ebp - 0x34], 0
push str.open_file_error_msg
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x30], 0
movups xmmword [ebp - 0x44], xmm0
call fcn.00404d90
lea eax, [ebp - 0x44]
mov dword [ebp - 4], 0
push eax
mov ecx, 0x4a19a0
call fcn.00432fb0
mov ecx, eax
cmp dword [eax + 0x14], 7
jbe 0x43673e
mov ecx, dword [eax]
push dword [eax + 0x10]
mov edx, esi
push ecx
lea ecx, [ebp - 0x5c]
call fcn.00418030
mov esi, eax
push 0xb8
lea eax, [ebp - 0x144]
mov byte [ebp - 4], 2
push 0
push eax
call fcn.00445500
add esp, 0x14
lea ecx, [ebp - 0x144]
push 0x49fb3c
call fcn.00408b20
cmp dword [esi + 0x14], 7
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x1c], 2
jbe 0x43678a
mov esi, dword [esi]
push eax
mov edx, esi
lea ecx, [ebp - 0x134]
call fcn.00422530
lea eax, [ebp - 0x134]
push eax
call fcn.00417ed0
add esp, 8
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x94]
test ecx, ecx
je 0x4367c1
lea eax, [ebp - 0x144]
push eax
call fcn.00417870
lea ecx, [ebp - 0x144]
call fcn.00408c60
mov ecx, dword [ebp - 0x48]
cmp ecx, 7
jbe 0x436806
mov edx, dword [ebp - 0x5c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4367fc
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x436c53
push ecx
push edx
call fcn.00443876
add esp, 8
mov ecx, dword [ebp - 0x30]
xor eax, eax
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 7
mov word [ebp - 0x5c], ax
cmp ecx, 0xf
jbe 0x436c30
mov edx, dword [ebp - 0x44]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x436c26
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x436c53
jmp 0x436c26
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov eax, dword [ebp - 0x24]
mov dword [eax], esi
cmp esi, 0xffffffff
jne 0x436a1a
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x4a1990]
cmp eax, dword [ecx + 4]
jle 0x4368b5
push 0x4a1990
call fcn.00443b49
add esp, 4
cmp dword [0x4a1990], esi
jne 0x4368b5
push 0x46b8f0
mov dword [0x4a19c4], 0
call fcn.00443861
push 0x4a1990
call fcn.00443af8
add esp, 8
push 0x17
xorps xmm0, xmm0
mov dword [ebp - 0x34], 0
push str.get_file_size_error_msg
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x30], 0
movups xmmword [ebp - 0x44], xmm0
call fcn.00404d90
lea eax, [ebp - 0x44]
mov dword [ebp - 4], 4
push eax
mov ecx, 0x4a19a0
call fcn.00432fb0
mov ecx, eax
cmp dword [eax + 0x14], 7
jbe 0x4368f8
mov ecx, dword [eax]
push dword [eax + 0x10]
mov edx, dword [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x5c]
call fcn.00418030
mov esi, eax
push 0xb8
lea eax, [ebp - 0x144]
mov byte [ebp - 4], 6
push 0
push eax
call fcn.00445500
add esp, 0x14
lea ecx, [ebp - 0x144]
push 0x49fb3c
call fcn.00408b20
cmp dword [esi + 0x14], 7
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x1c], 8
jbe 0x436945
mov esi, dword [esi]
push eax
mov edx, esi
lea ecx, [ebp - 0x134]
call fcn.00422530
lea eax, [ebp - 0x134]
push eax
call fcn.00417ed0
add esp, 8
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0x94]
test ecx, ecx
je 0x43697c
lea eax, [ebp - 0x144]
push eax
call fcn.00417870
lea ecx, [ebp - 0x144]
call fcn.00408c60
mov ecx, dword [ebp - 0x48]
cmp ecx, 7
jbe 0x4369c1
mov edx, dword [ebp - 0x5c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4369b7
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x436c58
push ecx
push edx
call fcn.00443876
add esp, 8
mov ecx, dword [ebp - 0x30]
xor eax, eax
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 7
mov word [ebp - 0x5c], ax
cmp ecx, 0xf
jbe 0x436a09
mov edx, dword [ebp - 0x44]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4369ff
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x436c58
push ecx
push edx
call fcn.00443876
add esp, 8
mov edi, dword [ebp - 0x28]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x436c36
mov eax, dword [edi + 4]
mov ecx, eax
mov edx, dword [edi]
sub ecx, edx
mov byte [ebp - 0x15], 0
mov dword [ebp - 0x20], eax
cmp esi, ecx
jae 0x436a33
lea eax, [edx + esi]
jmp 0x436a61
jbe 0x436a64
mov eax, dword [edi + 8]
sub eax, edx
cmp esi, eax
jbe 0x436a4c
lea eax, [ebp - 0x15]
mov ecx, edi
push eax
push esi
call fcn.00438b10
jmp 0x436a64
sub esi, ecx
push esi
push 0
push dword [ebp - 0x20]
call fcn.00445500
mov eax, dword [ebp - 0x20]
add esp, 0xc
add eax, esi
mov dword [edi + 4], eax
mov ecx, dword [ebp - 0x24]
lea eax, [ebp - 0x14]
push 0
push eax
mov dword [ebp - 0x14], 0
push dword [ecx]
push dword [edi]
mov edi, dword [ebp - 0x28]
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
jne 0x436c34
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x4a1990]
cmp eax, dword [ecx + 4]
jle 0x436adb
push 0x4a1990
call fcn.00443b49
add esp, 4
cmp dword [0x4a1990], 0xffffffff
jne 0x436adb
push 0x46b8f0
mov dword [0x4a19c4], esi
call fcn.00443861
push 0x4a1990
call fcn.00443af8
add esp, 8
push 0x13
xorps xmm0, xmm0
mov dword [ebp - 0x64], 0
push str.read_file_error_msg
lea ecx, [ebp - 0x74]
mov dword [ebp - 0x60], 0
movups xmmword [ebp - 0x74], xmm0
call fcn.00404d90
lea eax, [ebp - 0x74]
mov dword [ebp - 4], 8
push eax
mov ecx, 0x4a19a0
call fcn.00432fb0
mov ecx, eax
cmp dword [eax + 0x14], 7
jbe 0x436b1e
mov ecx, dword [eax]
push dword [eax + 0x10]
mov edx, dword [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x8c]
call fcn.00418030
mov esi, eax
push 0xb8
lea eax, [ebp - 0x1fc]
mov byte [ebp - 4], 0xa
push 0
push eax
call fcn.00445500
add esp, 0x14
lea ecx, [ebp - 0x1fc]
push 0x49fb3c
call fcn.00408b20
cmp dword [esi + 0x14], 7
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x1c], 0x20
jbe 0x436b6e
mov esi, dword [esi]
push eax
mov edx, esi
lea ecx, [ebp - 0x1ec]
call fcn.00422530
lea eax, [ebp - 0x1ec]
push eax
call fcn.00417ed0
add esp, 8
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x14c]
test ecx, ecx
je 0x436ba5
lea eax, [ebp - 0x1fc]
push eax
call fcn.00417870
lea ecx, [ebp - 0x1fc]
call fcn.00408c60
mov ecx, dword [ebp - 0x78]
cmp ecx, 7
jbe 0x436be9
mov edx, dword [ebp - 0x8c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x436bdf
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x436c5d
push ecx
push edx
call fcn.00443876
add esp, 8
mov ecx, dword [ebp - 0x60]
xor eax, eax
mov dword [ebp - 0x7c], 0
mov dword [ebp - 0x78], 7
mov word [ebp - 0x8c], ax
cmp ecx, 0xf
jbe 0x436c30
mov edx, dword [ebp - 0x74]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x436c26
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x436c5d
push ecx
push edx
call fcn.00443876
add esp, 8
xor al, al
jmp 0x436c36
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004435e2
mov esp, ebp
pop ebp
ret 0xc
call fcn.004483fa
call fcn.004483fa
call fcn.004483fa
int3