Function at 0x625d0440
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, ecx
push esi
mov esi, edx
push ebx
sub esp, 0x8c
mov dword [ebp - 0x6c], eax
cmp ecx, 2
je 0x625d05b0
cmp ecx, 8
je 0x625d0480
mov edx, 0x80070057
cmp ecx, 1
je 0x625d05a0
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, 0xc0000000
mov dword [ebp - 0x70], edx
mov dword [esp + 4], 0x38
mov dword [esp], 1
call dword [sym.imp.ucrtbase.dll_calloc]
mov ebx, eax
test eax, eax
je 0x625d0945
mov dword [eax + 0xc], sym._textstream_QueryInterface_12
mov edx, dword [ebp - 0x70]
mov dword [eax + 0x10], 1
mov dword [eax + 0x14], edi
mov eax, dword [ebp - 0x6c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CreateFileW]
mov dword [ebx + 0x28], eax
sub esp, 0x1c
cmp eax, 0xffffffff
je 0x625d0788
cmp edi, 1
je 0x625d06a8
mov dword [ebx + 0x20], 0
mov dword [ebx + 0x24], 0
cmp edi, 2
je 0x625d05c0
cmp dword [ebp + 8], 0xfffffffe
je 0x625d08f0
mov edx, dword [ebp + 8]
xor eax, eax
test edx, edx
setne al
mov dword [ebx + 0x18], eax
lea eax, [ebp - 0x60]
mov dword [esp + 0xc], 2
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebx + 0x28]
mov dword [ebp - 0x60], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_SetFilePointer]
mov edx, dword [ebx + 0x18]
sub esp, 0x10
test edx, edx
je 0x625d0572
or eax, dword [ebp - 0x60]
je 0x625d0820
lea esi, [ebx + 0xc]
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], 0x625d7920
call sym._init_classinfo
mov eax, dword [ebp + 0xc]
xor edx, edx
mov dword [eax], esi
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, 0x80000000
jmp 0x625d0485
mov edx, 0x40000000
jmp 0x625d0485
xor edx, edx
cmp dword [ebp + 8], 0xffffffff
sete dl
mov dword [ebx + 0x18], edx
jne 0x625d0572
lea edx, [esi - 1]
cmp edx, 1
jbe 0x625d05db
cmp esi, 5
jne 0x625d0572
lea edx, [ebp - 0x58]
mov dword [ebp - 0x58], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 8], 2
mov dword [esp + 4], 0x625d704c
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
test eax, eax
je 0x625d0620
cmp dword [ebp - 0x58], 2
je 0x625d0572
lea esi, [esi]
nop
mov edx, dword [ebx + 0xc]
add ebx, 0xc
mov dword [esp], ebx
call dword [edx + 8]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
sub esp, 4
cmp eax, 5
je 0x625d0890
jbe 0x625d0760
mov edx, 0x800a003a
cmp eax, 0x50
je 0x625d046f
cmp eax, 0xb7
je 0x625d046f
mov edx, 0x80004005
test byte [0x625d3028], 1
je 0x625d046f
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Unsupported_error_code:__ld_n
mov dword [esp + 8], str.create_error
mov dword [esp + 4], 0x625d3028
mov dword [esp], 0
mov dword [ebp - 0x6c], edx
call sym._wine_dbg_log.constprop.0_1
mov edx, dword [ebp - 0x6c]
jmp 0x625d046f
lea edx, [ebx + 0x20]
mov dword [esp], eax
lea esi, [ebp - 0x58]
mov dword [esp + 4], edx
call dword [sym.imp.kernel32.dll_GetFileSizeEx]
lea eax, [ebp - 0x64]
sub esp, 8
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x40
mov dword [esp + 4], esi
mov eax, dword [ebx + 0x28]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
test eax, eax
je 0x625d0620
cmp dword [ebp + 8], 0xfffffffe
jne 0x625d0878
mov eax, dword [ebp - 0x64]
mov dword [esp + 8], 0
mov dword [esp], esi
mov dword [esp + 4], eax
call dword [sym.imp.advapi32.dll_IsTextUnicode]
mov dword [ebx + 0x18], eax
sub esp, 0xc
mov edx, esi
mov esi, dword [ebx + 0x18]
mov ecx, dword [ebp - 0x64]
test esi, esi
je 0x625d0738
cmp ecx, 1
jbe 0x625d0738
cmp byte [ebp - 0x58], 0xff
je 0x625d0808
lea esi, [esi]
nop
mov eax, ebx
call sym._append_read_data
test eax, eax
js 0x625d07e8
xor eax, eax
cmp dword [ebp - 0x64], 0x40
setne al
mov dword [ebx + 0x2c], eax
jmp 0x625d0572
mov edx, 0x800a0035
cmp eax, 2
je 0x625d046f
cmp eax, 3
jne 0x625d0660
mov edx, 0x800a004c
jmp 0x625d046f
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
cmp eax, 5
je 0x625d08e0
jbe 0x625d07c8
mov edx, 0x800a003a
cmp eax, 0x50
je 0x625d07b1
cmp eax, 0xb7
jne 0x625d089a
mov dword [ebp - 0x6c], edx
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_free]
mov edx, dword [ebp - 0x6c]
jmp 0x625d046f
mov edx, 0x800a0035
cmp eax, 2
je 0x625d07b1
cmp eax, 3
jne 0x625d089a
mov edx, 0x800a004c
jmp 0x625d07b1
mov ecx, dword [ebx + 0xc]
add ebx, 0xc
mov dword [ebp - 0x6c], eax
mov dword [esp], ebx
call dword [ecx + 8]
mov edx, dword [ebp - 0x6c]
sub esp, 4
jmp 0x625d046f
cmp byte [ebp - 0x57], 0xfe
jne 0x625d0738
sub ecx, 2
lea edx, [ebp - 0x56]
jmp 0x625d0738
lea eax, [ebp - 0x5c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 2
mov dword [esp + 4], 0x625d704c
mov eax, dword [ebx + 0x28]
mov dword [ebp - 0x5c], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
test eax, eax
je 0x625d0863
cmp dword [ebp - 0x5c], 2
je 0x625d0572
mov eax, dword [ebx + 0xc]
add ebx, 0xc
mov dword [esp], ebx
call dword [eax + 8]
jmp 0x625d062c
mov edi, dword [ebp + 8]
xor eax, eax
test edi, edi
setne al
mov dword [ebx + 0x18], eax
jmp 0x625d0718
mov edx, 0x800a0046
jmp 0x625d046f
mov edx, 0x80004005
test byte [0x625d3028], 1
je 0x625d07b1
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Unsupported_error_code:__ld_n
mov dword [esp + 8], str.create_error
mov dword [esp + 4], 0x625d3028
mov dword [esp], 0
mov dword [ebp - 0x6c], edx
call sym._wine_dbg_log.constprop.0_1
mov edx, dword [ebp - 0x6c]
jmp 0x625d07b1
mov edx, 0x800a0046
jmp 0x625d07b1
lea edx, [ebp - 0x64]
lea esi, [ebp - 0x58]
mov dword [esp], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x40
mov dword [esp + 4], esi
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
test eax, eax
je 0x625d0620
mov eax, dword [ebp - 0x64]
mov dword [esp + 8], 0
mov dword [esp], esi
mov dword [esp + 4], eax
call dword [sym.imp.advapi32.dll_IsTextUnicode]
mov dword [ebx + 0x18], eax
sub esp, 0xc
jmp 0x625d0535
mov edx, 0x8007000e
jmp 0x625d046f