Function at 0x4dd1d0
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x50c958
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x53c1a4]
xor eax, esp
mov dword [esp + 0x1c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x53c1a4]
xor eax, esp
push eax
lea eax, [esp + 0x34]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x44]
mov esi, ecx
test esi, esi
jne 0x4dd24a
cmp byte [ebp + 0x44], cl
jne 0x4dd243
mov byte [ebp + 0x44], 1
mov dword [ebp + 0x48], 2
mov edx, dword [str.Failed_to_open_file]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4dd227
sub eax, esi
push eax
push edx
lea ecx, [ebp + 0x4c]
call fcn.00401820
or eax, 0xffffffff
mov dword [ebp + 0x70], eax
mov dword [ebp + 0x6c], eax
xor al, al
jmp 0x4dd437
mov edi, ebp
call fcn.004dc530
push 2
or ebx, 0xffffffff
push 0
push esi
mov dword [ebp + 8], ebx
mov dword [ebp + 4], ebx
call fcn.004ebc40
push esi
call fcn.004f015a
push 0
push 0
push esi
mov edi, eax
call fcn.004ebc40
xor eax, eax
add esp, 0x1c
cmp edi, eax
jg 0x4dd2c0
cmp byte [ebp + 0x44], al
jne 0x4dd2b9
mov byte [ebp + 0x44], 1
mov dword [ebp + 0x48], 0xd
mov edx, dword [str.Error_document_empty.]
mov eax, edx
lea esi, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4dd2a0
sub eax, esi
push eax
push edx
lea ecx, [ebp + 0x4c]
call fcn.00401820
mov dword [ebp + 0x70], ebx
mov dword [ebp + 0x6c], ebx
xor al, al
jmp 0x4dd437
mov dword [esp + 0x2c], 0xf
mov dword [esp + 0x28], eax
mov byte [esp + 0x18], al
mov dword [esp + 0x3c], eax
cmp edi, 0xf
je 0x4dd303
push 1
push edi
lea ecx, [esp + 0x1c]
call fcn.00401bf0
test al, al
je 0x4dd303
cmp dword [esp + 0x2c], 0x10
mov eax, dword [esp + 0x18]
mov dword [esp + 0x28], 0
jae 0x4dd300
lea eax, [esp + 0x18]
mov byte [eax], 0
lea eax, [edi + 1]
push eax
call fcn.004e94db
push esi
push 1
mov ebx, eax
push edi
push ebx
mov byte [ebx], 0
call fcn.004efab6
add esp, 0x14
cmp eax, 1
je 0x4dd37f
push ebx
call fcn.004eacff
add esp, 4
cmp byte [ebp + 0x44], 0
jne 0x4dd364
mov byte [ebp + 0x44], 1
mov dword [ebp + 0x48], 2
mov edx, dword [str.Failed_to_open_file]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4dd348
sub eax, esi
push eax
push edx
lea ecx, [ebp + 0x4c]
call fcn.00401820
or eax, 0xffffffff
mov dword [ebp + 0x70], eax
mov dword [ebp + 0x6c], eax
cmp dword [esp + 0x2c], 0x10
jb 0x4dd378
mov ecx, dword [esp + 0x18]
push ecx
call fcn.004ea82f
add esp, 4
xor al, al
jmp 0x4dd437
mov byte [ebx + edi], 0
cmp byte [ebx], 0
mov eax, ebx
mov esi, ebx
je 0x4dd3e7
lea esp, [esp]
mov cl, byte [esi]
cmp cl, 0xa
jne 0x4dd3ac
mov edx, esi
sub edx, eax
inc edx
push edx
push eax
lea eax, [esp + 0x1c]
call fcn.0042a4d0
inc esi
mov eax, esi
jmp 0x4dd3e2
cmp cl, 0xd
jne 0x4dd3e1
mov ecx, esi
sub ecx, eax
test ecx, ecx
jle 0x4dd3c4
push ecx
push eax
lea eax, [esp + 0x1c]
call fcn.0042a4d0
push 0xa
mov eax, 1
lea edi, [esp + 0x18]
call fcn.00411d00
cmp byte [esi + 1], 0xa
jne 0x4dd3a7
add esi, 2
mov eax, esi
jmp 0x4dd3e2
inc esi
cmp byte [esi], 0
jne 0x4dd390
sub esi, eax
je 0x4dd3f6
push esi
push eax
lea eax, [esp + 0x1c]
call fcn.0042a4d0
push ebx
call fcn.004eacff
mov eax, dword [esp + 0x1c]
add esp, 4
cmp dword [esp + 0x2c], 0x10
jae 0x4dd40e
lea eax, [esp + 0x18]
mov edx, dword [ebp]
push 0
push 0
push eax
mov eax, dword [edx + 8]
mov ecx, ebp
call eax
cmp byte [ebp + 0x44], 0
lea ecx, [esp + 0x14]
je 0x4dd430
call fcn.00401e10
xor al, al
jmp 0x4dd437
call fcn.00401e10
mov al, 1
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.004ea83a
add esp, 0x2c
ret 4