Function at 0x630780
Capabilities:
Get file size

Disassembly:
sub esp, 0x120
push ebx
push ebp
push esi
mov esi, 1
push edi
mov dword [esp + 0x20], esi
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], 0x80
call fcn.00630660
mov ebp, eax
mov eax, dword [esp + 0x13c]
push 0
mov dword [esp + 0x28], ebp
mov dword [eax], 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, dword [esp + 0x138]
mov eax, ebx
and eax, esi
mov dword [esp + 0x14], bind
mov dword [esp + 0x28], eax
je 0x6307e2
mov dword [esp + 0x18], esi
jmp 0x6307ea
mov dword [esp + 0x14], 0xc0000000
test bl, 2
je 0x630801
test bl, 4
mov ecx, 0
setne cl
inc ecx
mov dword [esp + 0x1c], ecx
jmp 0x630814
mov edx, ebx
and dl, 4
neg dl
sbb edx, edx
and edx, 2
add edx, 3
mov dword [esp + 0x1c], edx
test bl, 0x10
je 0x630821
mov dword [esp + 0x10], 0x20000080
test bl, 0x20
je 0x63082e
or dword [esp + 0x10], 0x8000000
mov eax, dword [0x706ccc]
mov esi, dword [esp + 0x134]
lea ebp, [ebp + ebp*8]
shl ebp, 2
push esi
mov dword [eax + ebp + 8], ebx
call fcn.00631990
add esp, 4
test eax, eax
je 0x630857
add eax, 0xffffffc0
jmp 0x630859
xor eax, eax
test bl, 0x40
mov ecx, dword [0x706ccc]
mov byte [ecx + ebp + 1], al
jne 0x63090b
push esi
call fcn.00630710
add esp, 4
test al, al
je 0x630905
mov ecx, dword [0x6d9e74]
mov dl, byte [ecx]
mov eax, dword [0x706ccc]
sub dl, 0x40
mov byte [eax + ebp + 1], dl
mov eax, dword [0x6d9e74]
lea edx, [esp + 0x2c]
sub edx, eax
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x6308a0
mov eax, esi
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x6308b0
lea edi, [esp + 0x2c]
sub eax, esi
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x6308c0
mov edx, dword [esp + 0x1c]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x18]
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x1c]
push edx
push 0
push eax
push ecx
lea edx, [esp + 0x44]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, dword [0x706ccc]
mov dword [ecx + ebp + 4], eax
jmp 0x63090b
mov ecx, dword [0x706ccc]
lea esi, [ecx + ebp]
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
lea edi, [esi + 4]
jne 0x630956
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
push 0
push eax
mov eax, dword [esp + 0x1c]
lea esi, [ecx + ebp]
mov ecx, dword [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x140]
push 0
push edx
push eax
push ecx
lea edi, [esi + 4]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov ecx, dword [0x706ccc]
mov dword [edi], eax
je 0x630a1a
mov dword [esi + 0xc], 0x2000
mov edx, dword [edi]
push 0
push edx
lea esi, [ecx + ebp]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test bl, 8
mov dword [esi + 0x1c], eax
je 0x6309df
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x630987
mov eax, 0x8000004
mov edi, 2
jmp 0x630991
mov eax, 0x8000002
mov edi, 4
push 0
push 0
push 0
push eax
mov eax, dword [esi + 4]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
test eax, eax
mov ecx, dword [0x706ccc]
lea esi, [ecx + ebp]
mov dword [esi + 0x10], eax
je 0x6309ca
lea esi, [ecx + ebp]
mov ecx, dword [esi + 0x1c]
push ecx
push 0
push 0
push edi
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esi + 0x14], eax
mov eax, dword [esi + 0x14]
test eax, eax
jne 0x6309f1
and dword [esi + 8], 0xfffffff7
mov dword [esp + 0x20], 0
jmp 0x6309f1
and dword [esi + 8], 0xfffffff7
mov dword [esi + 0x10], 0xffffffff
mov dword [esi + 0x14], 0
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x13c]
shr ebx, 6
not ebx
and ebx, 1
pop edi
mov dword [esi + 0x20], ebx
pop esi
not eax
pop ebp
mov dword [edx], eax
mov eax, dword [esp + 0x14]
pop ebx
add esp, 0x120
ret
pop edi
xor eax, eax
mov byte [esi], al
pop esi
pop ebp
pop ebx
add esp, 0x120
ret